2.0.4 • Published 2 years ago

@ahmadnassri/error v2.0.4

Weekly downloads
127
License
MIT
Repository
github
Last release
2 years 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

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.2

5 years ago

1.1.1

7 years ago

1.1.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago