diff options
Diffstat (limited to 'tcl_loader.cxx')
-rw-r--r-- | tcl_loader.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/tcl_loader.cxx b/tcl_loader.cxx index e7f22ff..5358ff5 100644 --- a/tcl_loader.cxx +++ b/tcl_loader.cxx @@ -52,21 +52,10 @@ gotone: snprintf(&b[0], MAXPDSTRING+10, "source %s", filename); int result = Tcl_Eval(tcl_for_pd, b); if(result == TCL_OK) { - post("Tcl_loader: loaded %s", filename); + post("Tcl loader: loaded %s", filename); } else { - post("Tcl_loader: error trying to load %s", filename); - post("Error: %s", Tcl_GetStringResult(tcl_for_pd)); - post("(see stderr for details)"); - - fprintf(stderr, "------------------- Tcl error: -------------------\n"); - Tcl_Obj* dict = Tcl_GetReturnOptions(tcl_for_pd, result); - Tcl_Obj* errorInfo = NULL; - Tcl_Obj* errorInfoK = Tcl_NewStringObj("-errorinfo", -1); - Tcl_IncrRefCount(errorInfoK); - Tcl_DictObjGet(tcl_for_pd, dict, errorInfoK, &errorInfo); - Tcl_DecrRefCount(errorInfoK); - fprintf(stderr, "%s\n", Tcl_GetStringFromObj(errorInfo, 0)); - fprintf(stderr, "--------------------------------------------------\n"); + post("Tcl loader: error trying to load %s", filename); + tclpd_interp_error(result); return 0; } |