cruks-lib-exception

1.1.0 • Public • Published

cruks-lib-exception

This package provides extendable Exception object

Example

Generic inheritance

var Exception = require("cruks-lib-exception").Exception;
 
function MyException (message, previous) {
    Exception.call(this, message, previous);
}
MyException.prototype = Object.create(Exception.prototype);
MyException.prototype.constructor = MyException;

Using Node.js util.inherits

var Exception = require("cruks-lib-exception").Exception,
    util = require("util");
 
function MyException (message, previous) {
    Exception.call(this, message, previous);
}
util.inherits(MyException, Exception);

Build Status Code Climate Dependency Status

Readme

Keywords

none

Package Sidebar

Install

npm i cruks-lib-exception

Weekly Downloads

16

Version

1.1.0

License

MIT

Last publish

Collaborators

  • mcharytoniuk