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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i simplerror

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • morrelinko