2.0.4 • Published 8 months ago

@ahmadnassri/error v2.0.4

Weekly downloads
127
License
MIT
Repository
github
Last release
8 months ago

Extendable Error

Extendable Error Class for use with Node.js

license release semantic

Install

npm install @ahmadnassri/error

Usage

const ExtendableError = require('@ahmadnassri/error')

class MyError extends ExtendableError {
  // constructor is optionaly useful for adding custom arguments, or methods:
  constructor (code, message, extra) {
    super(message)

    this.code = code
    this.extra = extra
  }

  getCode () {
    return this.code
  }
}

Author: Ahmad Nassri  Twitter: @AhmadNassri

2.0.4

8 months ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

2 years ago

1.1.2

4 years ago

1.1.1

6 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago