simplerror

1.0.0 • Public • Published

SimplError

Simple Custom Errors

Usage

const SimplError = require('simplerror')
 
throw new SimplError({
    message: 'Unexpected Error',
    code: 'UNEXPERR'
})

Extend

const SimplError = require('simplerror')
 
class DatabaseError extends SimpleError {
    constructor() {
        this.name = 'DatabaseError'
    }
}

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i simplerror

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • morrelinko