UNPKG

ts-db-helper

Version:
36 lines 1.14 kB
/** * @class QueryError is thrown when a query fails * * @see Error * @author Olivier Margarit * @since 0.1 */ var RestoreDataError = /** @class */ (function () { /** * @public * @constructor * @param {string} message message explaining in details error * @param {string} query query text that did failed execution * @param {string} params query params of the failed query */ function RestoreDataError(message) { var _newTarget = this.constructor; this.message = message; Object.setPrototypeOf(this, _newTarget.prototype); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = 'Restore data error'; } /** * @public * @method toString convert error to string * * @return {string} string represation of the error */ RestoreDataError.prototype.toString = function () { return this.name + '\n' + this.message; }; return RestoreDataError; }()); export { RestoreDataError }; //# sourceMappingURL=restore-data.error.js.map