run-time-error
    TypeScript icon, indicating that this package has built-in type declarations

    1.4.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

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

    This module can also be treated as a CommonJS module:

    const { RuntimeError } = require('run-time-error');

    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

    Building

    You can build UMD and ESM versions of this module that are minified:

    npm run build

    Testing

    This module also has a robust test suite:

    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

    768

    Version

    1.4.0

    License

    MIT

    Unpacked Size

    13.6 kB

    Total Files

    9

    Last publish

    Collaborators

    • lsphillips