New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unhandled

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unhandled

a window into your programs ignorance

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-70%
Maintainers
1
Weekly downloads
 
Created
Source

unhandled

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.

Installation

With component, packin or npm

$ {package mananger} install jkroso/unhandled

then in your app:

var unhandled = require('unhandled')

API

unhandled(value:Error)

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

emits:

  • add
  • forget

unhandled.windowSize

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

unhandled.remove(value:Error)

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

emits:

  • remove

Running the tests

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

Keywords

FAQs

Package last updated on 26 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc