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'
    }
}

Readme

Keywords

Package Sidebar

Install

npm i simplerror

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • morrelinko