*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> Tk/tkerror (3)              
Title
Content
Arch
Section
 

Contents


tkerror(3Tk)							  tkerror(3Tk)


NAME    [Toc]    [Back]

     tkerror - Command invoked to process background errors

SYNOPSIS    [Toc]    [Back]

     tkerror message

DESCRIPTION    [Toc]    [Back]

     The tkerror command doesn't exist as built-in part	of Tk.	Instead,
     individual	applications or	users can define a tkerror command (e.g. as a
     Tcl procedure) if they wish to handle background errors.

     A background error	is one that occurs in a	command	that didn't originate
     with the application.  For	example, if an error occurs while executing a
     command specified with a bind of after command, then it is	a background
     error.  For a non-background error, the error can simply be returned up
     through nested Tcl	command	evaluations until it reaches the top-level
     code in the application; then the application can report the error	in
     whatever way it wishes.  When a background	error occurs, the unwinding
     ends in the Tk library and	there is no obvious way	for Tk to report the
     error.

     When Tk detects a background error, it saves information about the	error |
     and invokes the tkerror command later when	Tk is idle.  Before invoking  |
     tkerror, Tk restores the errorInfo	and errorCode variables	to their      |
     values at the time	the error occurred, then it invokes tkerror with the
     error message as its only argument.  Tk assumes that the application has
     implemented the tkerror command, and that the command will	report the
     error in a	way that makes sense for the application.  Tk will ignore any
     result returned by	the tkerror command.

     If	another	Tcl error occurs within	the tkerror command (for example,
     because no	tkerror	command	has been defined) then Tk reports the error
     itself by writing a message to stderr.

     If	several	background errors accumulate before tkerror is invoked to     |
     process them, tkerror will	be invoked once	for each error,	in the order  |
     they occurred.  However, if tkerror returns with a	break exception, then |
     any remaining errors are skipped without calling tkerror.

     The Tk script library includes a default tkerror procedure	that posts a
     dialog box	containing the error message and offers	the user a chance to
     see a stack trace showing where the error occurred.

KEYWORDS    [Toc]    [Back]

     background	error, reporting


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
foreground IRIX prevents a graphical process from being put into the background
imakebackground IRIX registers the screen background process
setpmac FreeBSD run a command with a different MAC process label
fc IRIX process the command history list
parseargv IRIX process command-line options
acctcms IRIX command summary from per-process accounting records
acctcms HP-UX command summary from per-process accounting records
timex HP-UX time a command; report process data and system activity
timex IRIX time a command; report process data and system activity
runon Tru64 Runs a command or process on a specific CPU, a processor set (pset), or a Resource Affinity Domain (...
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service