diff options
Diffstat (limited to 'source4/scripting/ejs/smbscript.c')
-rw-r--r-- | source4/scripting/ejs/smbscript.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c index b16536a575..a35b988e56 100644 --- a/source4/scripting/ejs/smbscript.c +++ b/source4/scripting/ejs/smbscript.c @@ -24,17 +24,21 @@ #include "includes.h" #include "dynconfig.h" #include "lib/appweb/ejs/ejs.h" +#include "lib/appweb/ejs/ejsInternal.h" #include "scripting/ejs/smbcalls.h" +static EjsId eid; + void ejs_exception(const char *reason) { - fprintf(stderr, "smbscript exception: %s", reason); + Ejs *ep = ejsPtr(eid); + ejsSetErrorMsg(eid, "%s", reason); + fprintf(stderr, "%s", ep->error); exit(127); } int main(int argc, const char **argv) { - EjsId eid; EjsHandle handle = 0; MprVar result; char *emsg, *script; |