mirror of
https://github.com/samba-team/samba.git
synced 2025-10-26 23:33:15 +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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
fc15e1b003
commit
84c756b25c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user