A better error that is inspired by the Java exception that is also serializable to JSON.
The RuntimeError constructor has this signature:
RuntimeError(String message [, Error cause])
trythrow 'The root cause error.';catch causethrow 'An unexpected error occurred while performing an operation.' cause;
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.
This project doesn't have much of a build process. It does have tests though; which you can run like so:
This also runs code quality checks using ESLint. Please refer to the
.eslintrc files to familiar yourself with the rules.
This project is released under the MIT license.