summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.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/tclBasic.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/tclBasic.c')
-rw-r--r--generic/tclBasic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d8ab1d0..30631a5 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.360 2008/08/23 01:42:54 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.361 2008/08/23 01:48:25 msofer Exp $
*/
#include "tclInt.h"
@@ -4302,9 +4302,11 @@ NRCallTEBC(
case TCL_NR_YIELD_TYPE:
if (iPtr->execEnvPtr->corPtr) {
Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC);
+ Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL);
} else {
Tcl_SetResult(interp, "yield can only be called in a coroutine",
TCL_STATIC);
+ Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL);
}
return TCL_ERROR;
default: