diff options
author | dgp <dgp@users.sourceforge.net> | 2007-09-06 18:13:19 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-09-06 18:13:19 (GMT) |
commit | fa9ca5327da10d6516693b272a082e03a255c835 (patch) | |
tree | 21db3085afb048eebeefccee941778b5e8733f74 /generic/tclIO.c | |
parent | d5f98c3ef4786469dfaedb23c4deeffd2973be05 (diff) | |
download | tcl-fa9ca5327da10d6516693b272a082e03a255c835.zip tcl-fa9ca5327da10d6516693b272a082e03a255c835.tar.gz tcl-fa9ca5327da10d6516693b272a082e03a255c835.tar.bz2 |
* generic/tclInt.decls: New internal routine TclBackgroundException()
* generic/tclEvent.c: that for the first time permits non-TCL_ERROR
exceptions to trigger [interp bgerror] handling. Closes a gap in
TIP 221. When falling back to [bgerror] (which is designed only
to handle TCL_ERROR), convert exceptions into errors complaining
about the exception.
* generic/tclInterp.c: Convert Tcl_BackgroundError() callers to call
* generic/tclIO.c: TclBackgroundException().
* generic/tclIOCmd.c:
* generic/tclTimer.c:
* generic/tclIntDecls.h: make genstubs
* generic/tclStubInit.c:
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 4e1c56b..145d27a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.122 2007/07/02 19:18:10 dgp Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.123 2007/09/06 18:13:19 dgp Exp $ */ #include "tclInt.h" @@ -7932,7 +7932,7 @@ TclChannelEventScriptInvoker( if (chanPtr->typePtr != NULL) { DeleteScriptRecord(interp, chanPtr, mask); } - Tcl_BackgroundError(interp); + TclBackgroundException(interp, result); } Tcl_Release((ClientData) interp); } @@ -8394,6 +8394,7 @@ CopyData( total = csPtr->total; if (cmdPtr && interp) { + int code; /* * Get a private copy of the command so we can mutate it by adding * arguments. Note that StopCopy frees our saved reference to the @@ -8409,8 +8410,9 @@ CopyData( if (errObj) { Tcl_ListObjAppendElement(interp, cmdPtr, errObj); } - if (Tcl_EvalObjEx(interp, cmdPtr, TCL_EVAL_GLOBAL) != TCL_OK) { - Tcl_BackgroundError(interp); + code = Tcl_EvalObjEx(interp, cmdPtr, TCL_EVAL_GLOBAL); + if (code != TCL_OK) { + TclBackgroundException(interp, code); result = TCL_ERROR; } TclDecrRefCount(cmdPtr); |