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:
committed by
Gerald (Jerry) Carter
parent
a92e61c452
commit
8f9478b09d
@ -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