Skip to content

Instantly share code, notes, and snippets.

@PrototypeAlex
Created January 27, 2015 05:43
Show Gist options
  • Save PrototypeAlex/029fa4edad7bcd850ff9 to your computer and use it in GitHub Desktop.
Save PrototypeAlex/029fa4edad7bcd850ff9 to your computer and use it in GitHub Desktop.
Errors: NodeJS Wellington - Lighting Talk

Errors

throw new Error('undefined is undefined in anon:30')

Operational vs Exceptional

Catching errors

  • Catch and respond to op errors, log exceptional at the correct level and throw up
  • Controllers in express... on next tick >_<

Uncaught exception handling

Error, VError and WError

Bluebird hacks

Domains

Errors in streams (Errors in gulp) -> shitty errors

  • emit the error event! but wait....
  • gulp-plumber or event-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

Logging

Error notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment