format-throw
Tiny utility to throw errors with formatted messages and support for custom error classes.
Installation
npm install --save format-throw
Usage
var thr = ; // Throw a TypeError; // Throw a default Error; // Return the error instance instead of throwing itvar err1 = thr;var err2 = thr;
Contributing
Take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt test
.
License
Copyright (c) 2015 Felix Zandanel
Licensed under the MIT license.
See LICENSE for more info.