summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-08-23 01:48:24 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-08-23 01:48:24 (GMT)
commit0e7c2a3c941ea709e13087114f8467e4b19d0777 (patch)
tree78339a61d78b0f23cd459158bd0816a368730557 /generic/tclExecute.c
parent94a254e8f66296402989d1c1fae71f7bc0b88f4d (diff)
downloadtcl-0e7c2a3c941ea709e13087114f8467e4b19d0777.zip
tcl-0e7c2a3c941ea709e13087114f8467e4b19d0777.tar.gz
tcl-0e7c2a3c941ea709e13087114f8467e4b19d0777.tar.bz2
* generic/tclBasic.c: Set special errocodes: COROUTINE_BUSY,
COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 0311da2..453be92 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.407 2008/08/20 15:02:32 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.408 2008/08/23 01:48:26 msofer Exp $
*/
#include "tclInt.h"
@@ -1946,6 +1946,7 @@ TclExecuteByteCode(
if (!corPtr) {
Tcl_SetResult(interp,
"yield can only be called in a coroutine", TCL_STATIC);
+ Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL);
result = TCL_ERROR;
goto checkForCatch;
}
@@ -1955,6 +1956,7 @@ TclExecuteByteCode(
if (corPtr->stackLevel != &initLevel) {
Tcl_SetResult(interp,
"cannot yield: C stack busy", TCL_STATIC);
+ Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL);
result = TCL_ERROR;
goto checkForCatch;
}