diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-23 01:48:24 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-23 01:48:24 (GMT) |
commit | 0e7c2a3c941ea709e13087114f8467e4b19d0777 (patch) | |
tree | 78339a61d78b0f23cd459158bd0816a368730557 /generic/tclBasic.c | |
parent | 94a254e8f66296402989d1c1fae71f7bc0b88f4d (diff) | |
download | tcl-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.c | 4 |
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: |