Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

run-time-error

1.2.0 • Public • Published

RuntimeError

Available from NPM Built using Travis

A better error that is inspired by the Java exception that is also serializable to JSON.

Usage

The RuntimeError constructor has this signature:

RuntimeError(String message [, Error cause])

Example usage:

try
{
  throw new Error('The root cause error.');
}
catch (cause)
{
  throw new RuntimeError('An unexpected error occurred while performing an operation.', cause);
}

Getting started

This project is available through the Node Package Manager (NPM), so you can install it like so:

npm install run-time-error

Please Note: Versions of Node lower than v6.0.0 are not supported.

Development

This project doesn't have much of a build process. It does have tests though; which you can run like so:

npm test

This also runs code quality checks using ESLint. Please refer to the .eslintrc files to familiar yourself with the rules.

License

This project is released under the MIT license.

install

npm i run-time-error

Downloadsweekly downloads

0

version

1.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability