Hadn't thought of wrapping the code in a domain, thanks for the idea.  Will
give that a try and see if it gets me closer.  Trying to catch typos on a
remote SSH client instead of just getting a generic Hapi error back.

On Wed, Dec 10, 2014 at 9:49 PM, Andrey <andrey.sido...@gmail.com> wrote:

> 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
> <https://groups.google.com/d/msgid/nodejs/c8fb51bd-e38a-4dd3-8257-8b91b34fefec%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAhs7EhP73qTEoVQ9ZEKY5HGiheeLH85FV87PuCRYyCW-Xr5tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to