BackgdErr.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1992-1994 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: BackgdErr.3,v 1.3 2000/04/14 23:01:48 hobbs Exp $
- '"
- .so man.macros
- .TH Tcl_BackgroundError 3 7.5 Tcl "Tcl Library Procedures"
- .BS
- .SH NAME
- Tcl_BackgroundError - report Tcl error that occurred in background processing
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- fBTcl_BackgroundErrorfR(fIinterpfR)
- .SH ARGUMENTS
- .AS Tcl_Interp *interp
- .AP Tcl_Interp *interp in
- Interpreter in which the error occurred.
- .BE
- .SH DESCRIPTION
- .PP
- This procedure is typically invoked when a Tcl error occurs during
- ``background processing'' such as executing an event handler.
- When such an error occurs, the error condition is reported to Tcl
- or to a widget or some other C code, and there is not usually any
- obvious way for that code to report the error to the user.
- In these cases the code calls fBTcl_BackgroundErrorfR with an
- fIinterpfR argument identifying the interpreter in which the
- error occurred. At the time fBTcl_BackgroundErrorfR is invoked,
- the interpreter's result is expected to contain an error message.
- fBTcl_BackgroundErrorfR will invoke the fBbgerrorfR
- Tcl command to report the error in an application-specific fashion.
- If no fBbgerrorfR command exists, or if it returns with an error condition,
- then fBTcl_BackgroundErrorfR reports the error itself by printing
- a message on the standard error file.
- .PP
- fBTcl_BackgroundErrorfR does not invoke fBbgerrorfR immediately
- because this could potentially interfere with scripts that are in process
- at the time the error occurred.
- Instead, it invokes fBbgerrorfR later as an idle callback.
- fBTcl_BackgroundErrorfR saves the values of the fBerrorInfofR and
- fBerrorCodefR variables and restores these values just before
- invoking fBbgerrorfR.
- .PP
- It is possible for many background errors to accumulate before
- fBbgerrorfR is invoked. When this happens, each of the errors
- is processed in order. However, if fBbgerrorfR returns a
- break exception, then all remaining error reports for the
- interpreter are skipped.
- .SH KEYWORDS
- background, bgerror, error