imba-error
v1.0.0
Published
Easily extend the native Error for custom use within Imba
Downloads
3
Readme
Imba Error
Easily extend the native
Error
for custom use within Imba
Installation
npm install imba-error --save
Usage
import Errorable from 'imba-error'
class CustomError < Errorable
def initialize msg = 'Default Custom Message!'
super msg
# somewhere else...
throw CustomError.new "Hey! Don't do that!"
# outputs:
# CustomError {message: "Hey! Don't do that!", name: "CustomError", stack: (...)}
API
message
Type: string
Default: ''
The message to throw
License
MIT © Luke Edwards