@sap/xsodata
Version:
Expose data from a HANA database as OData V2 service with help of .xsodata files.
30 lines (24 loc) • 642 B
JavaScript
;
const 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);