@mhio/exception

0.2.1 • Public • Published

Exception - @mhio/exception

ES2015+ Exception class extending Error

Install

yarn add @mhio/exception
npm install @mhio/exception

Usage

API Docs

import { Exception } from '@mhio/exception'

class MyException extends Exception {
  constructor( message, options = {} ){
    super(message, options)
    this.myprop = options.myprop
  }
}


throw new MyException('Normal error message', { simple: 'Set a simple message', label: 'UI Label', myprop: 13 })

Links

Readme

Keywords

none

Package Sidebar

Install

npm i @mhio/exception

Weekly Downloads

1

Version

0.2.1

License

MIT

Unpacked Size

38.9 kB

Total Files

13

Last publish

Collaborators

  • mhio