node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



a window into your programs ignorance. when you write asynchronous and concurrent programs it is sometimes desirable to ignore errors, other times you just forget to add an error handlers. Either way its interesting to see which errors your program is choosing not to handle. This module provides a moving window into the most recent set of unhandled errors in your application. Note: you shouldn't actually be telling this module about any errors thats a job for your control flow tools. Low level tools put errors in this thing so you have the option to look at them.

If you use tools like co with fork joins you would find this modules output especially interesting because the errors you don't handle (and the ones you do) could easily be different between runs due to normal variations in IO timing. co along with most other control flow tools don't provide access to unhandled errors though.


With component, packin or npm

$ {package mananger} install jkroso/unhandled

then in your app:

var unhandled = require('unhandled')



add an error. if you don't pass an error it will behave as a getter for the current window of errors.


  • add
  • forget


The max number of errors to store. Any more added after that will cause older errors to be forgotten. The default size is 20.


remove value from the window. Returns true if value was in the window


  • remove

Running the tests

Just run make. It will install and start a development server leaving the tests waiting for you at