UNPKG

hydrate-mongodb

Version:
26 lines (25 loc) 728 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ErrorBase = (function () { function ErrorBase(message, cause) { this.name = "Error"; Error.call(this, message); if (cause) { this._cause = cause; } this.message = message; if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } else { this.stack = new Error(message).stack; } } return ErrorBase; }()); exports.ErrorBase = ErrorBase; ErrorBase.prototype = Object.create(Error.prototype); ErrorBase.prototype.constructor = ErrorBase; ErrorBase.prototype.cause = function () { return this._cause; };