1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r9504: use some low level ejs hackery to give much better exception error messages in both

the web server and smbscript. We can now give backtraces for all internal asserts, not
just high level errors
(This used to be commit 84c756b25c)
This commit is contained in:
Andrew Tridgell
2005-08-23 05:21:04 +00:00
committed by Gerald (Jerry) Carter
parent a92e61c452
commit 8f9478b09d
3 changed files with 17 additions and 19 deletions

View File

@ -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;