1.0.0 • Published 7 years ago
simplerror v1.0.0
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'
}
}