const sandbox = new Sandbox();
const code = `function onStart() {
console.log(some_undefined_var);
}
return { onStart: onStart };
`;
const exec = sandbox.compile(code);
const script_context = exec({}).run();
// here an error should occur...
script_context['onStart']();
So I would like to know at which line(maybe?) the error occurred while executing the code in the provided coding string, I think I can get the function name in a way but need some examples of how to approach this.
So I would like to know at which line(maybe?) the error occurred while executing the
codein the provided coding string, I think I can get the function name in a way but need some examples of how to approach this.