[quickjs-devel] stackframe and line number

  • From: JM <jeevhi@xxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Tue, 4 Feb 2020 19:01:53 +0530

How to dump filename and line number when calling a javascript function
using JS_EvalFunction() and having an exception

The following code does not dump the stack frame.

JSValue value = JS_EvalFunction(ctx, byte_code);
if (JS_IsException(value)) {
                js_std_dump_error(ctx);
}

It seems like JS_EvalFunction internally calls  JS_EvalFunctionInternal
with NULL JSStackFrame, is that a reason? how to solve it?

Other related posts: