You can set an "uncaught exception handler" that just logs the
exception, then your application won't exit if there's an uncaught
exception:
// Don't exit if there's an uncaught exception
process.on('uncaughtException', function (err) {
logger.log('Uncaught exception:', err.message, err.stack);
});
If you want some exceptions to exit the application and some not, you
can probably scan the stack trace of the exception to detect what part
of the application it came from.
On Jan 29, 8:35 pm, Arieh Glazer <[email protected]> wrote:
> Hey guys
> A bit new to node here-
> When using DOM Events, each function is executed in its own context.
>
> It threw an error and stopped the loop.
>
> Is there any node equivalent to the DOM events behavior?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en