0.1.1 • Published 9 years ago

node-raise v0.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

Raise

Raise is a small utility to throw meaningful error with ease.

Installation

$ npm install node-raise --save

Usage

var
    raise = require('node-raise');

raise(Error, 'An error message with %s %d %j', 'string', 1, { key: 'value' }, 'and something else');

First argument is the error type; second argument is a printf-like format string; remaining arguments are actual values for placeholders in second argument.

See Node.js' util.format for further info.

License

The project is licensed under the MIT license.