Wrapping the call in try/catch does't capture anything that is within an async call within the script being executed.
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)
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.
댓글 없음:
댓글 쓰기