Tcl8.6.7/Tk8.6.7 Documentation > Tcl C API, version 8.6.7 > BackgdErr
Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API
- Tcl_Interp *interp (in)
- Interpreter in which the exception occurred.
- int code (in)
- The exceptional return code to be reported.
Tcl_BackgroundException does not invoke the handler command immediately because this could potentially interfere with scripts that are in process at the time the error occurred. Instead, it invokes the handler command later as an idle callback.
It is possible for many background exceptions to accumulate before the handler command is invoked. When this happens, each of the exceptions is processed in order. However, if the handler command returns a break exception, then all remaining error reports for the interpreter are skipped.
The Tcl_BackgroundError routine is an older and simpler interface useful when the exception code reported is TCL_ERROR. It is equivalent to:
Tcl_BackgroundException(interp, TCL_ERROR);background, bgerror, error, interp
Copyright © 1994-1996 Sun Microsystems, Inc.