summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 87504b3..9402cbb 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -272,7 +272,7 @@ extern NSString *opaqueTag;
int code = Tcl_EvalEx(_eventInterp, cmd, -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
- Tcl_BackgroundError(_eventInterp);
+ Tcl_BackgroundException(_eventInterp, code);
}
Tcl_ResetResult(_eventInterp);
}
@@ -703,11 +703,10 @@ TkWmProtocolEventProc(
Tcl_Preserve(interp);
result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL);
if (result != TCL_OK) {
- Tcl_AddErrorInfo(interp, "\n (command for \"");
- Tcl_AddErrorInfo(interp,
- Tk_GetAtomName((Tk_Window) winPtr, protocol));
- Tcl_AddErrorInfo(interp, "\" window manager protocol)");
- Tcl_BackgroundError(interp);
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
+ "\n (command for \"%s\" window manager protocol)",
+ Tk_GetAtomName((Tk_Window) winPtr, protocol)));
+ Tcl_BackgroundException(interp, result);
}
Tcl_Release(interp);
Tcl_Release(protPtr);