summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
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;
}