UNPKG

@sap/xsodata

Version:

Expose data from a HANA database as OData V2 service with help of .xsodata files.

32 lines (24 loc) 646 B
'use strict'; var util = require('util'); module.exports = XsODataError; /** * Superclass for all Errors * @param message * @param cause * @constructor */ function XsODataError(message, cause) { /* jshint ignore:start */ Error.captureStackTrace(this, this.constructor); // jshint ignore:line /* jshint ignore:end */ this.name = this.constructor.name; this.message = message; this.cause = cause; } XsODataError.prototype.toString = function () { let ret = ""; ret = this.stack.toString(); ret += (this.cause) ? ("\n" + this.cause + "\n") : ""; return ret; }; util.inherits(XsODataError, Error);