1.0.0 • Published 8 years ago

imba-error v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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