diff --git a/tcl/Exception.i b/tcl/Exception.i index d7d0b893..6b786981 100644 --- a/tcl/Exception.i +++ b/tcl/Exception.i @@ -25,8 +25,8 @@ exit(0); } catch (std::exception &excp) { - char *msg = stringPrint("Error: %s", excp.what()); - Tcl_SetResult(interp, msg, nullptr); + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "Error: ", excp.what(), nullptr); return TCL_ERROR; } }