npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

imba-error

1.0.0

@lukeed

npmHomeRepoSnykSocket
Downloads:72
$ npm install imba-error
DailyWeeklyMonthlyYearly

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