Skip to content

Easily extend the native Error for use within Imba

Notifications You must be signed in to change notification settings

lukeed/imba-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imba Error

Easily extend the native Error for custom use within Imba

npm package

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

About

Easily extend the native Error for use within Imba

Resources

Stars

Watchers

Forks

Packages

No packages published