throw new Error('undefined is undefined in anon:30')
- https://www.joyent.com/developers/node/design/errors
- Operational errors represent run-time problems experienced by correctly-written programs
- Programmer errors are bugs in the program
- Catch and respond to op errors, log exceptional at the correct level and throw up
- Controllers in express... on next tick >_<
- Crash and burn!
- "By the very nature of how throw works in JavaScript, there is almost never any way to safely 'pick up where you left off', without leaking references, or creating some other sort of undefined brittle state."
- http://nodejs.org/api/domain.html#domain_warning_don_t_ignore_errors
- Getting more context from your errors
- https://github.com/davepacheco/node-verror
.error
vs.catch
- https://github.com/petkaantonov/bluebird/blob/master/API.md
- http://nodejs.org/api/domain.html
- Good for clustering and streams
- emit the error event! but wait....
gulp-plumber
orevent-stream
get around this- or wrap your stream up in a domain, this preserves stack traces
- Huge thread on how shit errors are in
{node|io}.js
: nodejs/node#89