You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constsandbox=newSandbox();constcode=`function onStart() { console.log(some_undefined_var);}return { onStart: onStart };`;constexec=sandbox.compile(code);constscript_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.
The text was updated successfully, but these errors were encountered:
IamSanjid
changed the title
How to handle errors which occurred while executing?
How to get the line number of an error when executing code in the sandbox?
Mar 21, 2023
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.The text was updated successfully, but these errors were encountered: