err-candy

DEPRECATED use this instead: https://github.com/matthewmueller/combine-errors

Downloads
15
Stars
5

DEPRECATED use this instead: https://github.com/matthewmueller/combine-errors

err-candy

Better formatting for your errors. Supports combining errors into one.

Features

  • Combines multiple errors into one
  • Normalizes the error message
  • Cleans up the stack trace

Installation

npm install err-candy

Usage

Single Error:

var candy = req('err-candy')
var error = candy(new Error('a'))
throw err

Multiple Errors:

var candy = req('err-candy')

var errors = [
  new Error('a'),
  new Error('b')
]

var error = candy(errors)
throw err

License

MIT

Package Rankings
Top 16.96% on Npmjs.org