summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-07-03 17:33:33 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-07-03 17:33:33 (GMT)
commit38941ce68c0dc6530844e8d58bd9ba4f4582a92e (patch)
tree34df41075b69eddd114a36ff1e0ccef766afa0d5 /generic
parentacfa67110011db6c2f778398384ea00e11ef0889 (diff)
downloadtcl-38941ce68c0dc6530844e8d58bd9ba4f4582a92e.zip
tcl-38941ce68c0dc6530844e8d58bd9ba4f4582a92e.tar.gz
tcl-38941ce68c0dc6530844e8d58bd9ba4f4582a92e.tar.bz2
* generic/tclCompCmds.c (TclCompileCatchCmd): return
TCL_OUT_LINE_COMPILE instead of TCL_ERROR: let the failure happen at runtime so that it can be caught [Bug 577015].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 3b04946..43d2146 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmds.c,v 1.30 2002/06/11 15:42:20 msofer Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.31 2002/07/03 17:33:39 msofer Exp $
*/
#include "tclInt.h"
@@ -244,7 +244,6 @@ TclCompileCatchCmd(interp, parsePtr, envPtr)
char *name;
int localIndex, nameChars, range, startOffset, jumpDist;
int code;
- char buffer[32 + TCL_INTEGER_SPACE];
int savedStackDepth = envPtr->currStackDepth;
if ((parsePtr->numWords != 2) && (parsePtr->numWords != 3)) {
@@ -321,11 +320,7 @@ TclCompileCatchCmd(interp, parsePtr, envPtr)
envPtr->exceptArrayPtr[range].codeOffset = startOffset;
if (code != TCL_OK) {
- if (code == TCL_ERROR) {
- sprintf(buffer, "\n (\"catch\" body line %d)",
- interp->errorLine);
- Tcl_AddObjErrorInfo(interp, buffer, -1);
- }
+ code = TCL_OUT_LINE_COMPILE;
goto done;
}
envPtr->exceptArrayPtr[range].numCodeBytes =