mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-17 01:33:16 +03:00
Log more of the JS error object
This commit is contained in:
parent
e331784ea3
commit
1ee30e7632
@ -391,7 +391,16 @@ bool js_exec(jscontext *ctx, const char *txt, size_t txtlen)
|
||||
duk_push_lstring(CTX, txt, txtlen);
|
||||
|
||||
if (duk_safe_call(CTX, eval_top_string, 1, 1) == DUK_EXEC_ERROR) {
|
||||
LOG("JAVASCRIPT WENT BANG: %s", duk_safe_to_string(CTX, 0));
|
||||
duk_get_prop_string(CTX, 0, "name");
|
||||
duk_get_prop_string(CTX, 0, "message");
|
||||
duk_get_prop_string(CTX, 0, "fileName");
|
||||
duk_get_prop_string(CTX, 0, "lineNumber");
|
||||
duk_get_prop_string(CTX, 0, "stack");
|
||||
LOG("JAVASCRIPT WENT BANG: %s: %s", duk_safe_to_string(CTX, 1),
|
||||
duk_safe_to_string(CTX, 2));
|
||||
LOG("Explosion was at %s line %s", duk_safe_to_string(CTX, 3),
|
||||
duk_safe_to_string(CTX, 4));
|
||||
LOG("Stack trace:\n%s", duk_safe_to_string(CTX, 5));
|
||||
return false;
|
||||
}
|
||||
if (duk_get_top(CTX) == 0) duk_push_boolean(CTX, false);
|
||||
|
Loading…
Reference in New Issue
Block a user