no. You are only creating context, not full sandboxed JS environment.
The code is called from the same event loop and functions you have in your 
context are same regular functions as in the rest of the code.
All possible solutions are same as for "how do I handle async errors" 
question. Use domains, zones, co+generators etc (nothing gives you 100% 
guarantee)

On Thursday, 11 December 2014 11:01:47 UTC+11, Jeremy wrote:
>
> Is there any way to actually capture exceptions from code running 
> vm.runInNewContext or vm.runInContext, etc...?  Seems there should be an 
> on('error') or something callback but can't find it.
>
> Wrapping the call in try/catch does't capture anything that is within an 
> async call within the script being executed.
>
>  - Jeremy
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/c8fb51bd-e38a-4dd3-8257-8b91b34fefec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to