- CLASS
- tcl.lang.Interp -- This manual entry contains Interp methods that
report Tcl background errors.
- METHODS
- void backgroundError()
- void addErrorInfo(String message)
- void setErrorCode(TclObject code)
- OTHER METHODS
- ARGUMENTS
- DESCRIPTION
- backgroundError
- addErrorInfo
- setErrorCode
- EQUIVALENT C FUNCTIONS
- SEE ALSO
- KEYWORDS
tcl.lang.Interp -- This manual entry contains Interp methods that
report Tcl background errors.
void backgroundError()
void addErrorInfo(String message)
void setErrorCode(TclObject code)
setVar,
traceVar,
createCommand,
eval,
setResult,
getNotifier,
setAssocData,
dispose,
pkgRequire
- String message ()
-
Message to appear in global errorInfo Tcl variable.
- TclObject code ()
-
TclObject to become value of global errorCode Tcl variable.
The procedures described here are utilities for reporting Tcl errors
that occurred in background processing. See the manual entry
setResult for information on storing result values.
- backgroundError
-
The backgroundError method is typically invoked when a Tcl error
occurs during "background processing" such as executing an event
handler. When backgroundError() is called, it saves the current
result, errorCode and errorInfo and will invoke the "bgerror" command
at a later time as an idle callback. If no bgerror command exists, or
if the bgerror command returns with an error condition, then
backgroundError() reports the error itself by printing a message on
the standard error output. It is possible for many background errors
to accumulate before bgerror is invoked. When this happens, each of
the errors is processed in order. However, if bgerror returns a break
exception, then all remaining error reports for the interpreter are
skipped.
- addErrorInfo
-
The addErrorInfo method appends message to the
errorInfo object in the interpreter. The errorInfo object is mirrored
in Tcl scripts via the "errorInfo" global variable.
- setErrorCode
-
The setErrorCode method sets the interpreter's errorCode object
to the value of code. The errorCode object is mirrored in Tcl
scripts via the "errorCode" global variable.
Tcl_BackgroundError, Tcl_AddErrorInfo, Tcl_SetObjErrorCode
Interp, TclException, TclRuntimeError, TclEvent, dispose, setAssocData
background, bgerror, error, interpreter
Copyright © 1994-1998 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.