1
0
Fork 0
arangodb/js/apps/system/_system/sessions/APP/errors.js

19 lines
697 B
JavaScript

'use strict';
function SessionNotFound(sid) {
this.message = 'Session with session id ' + sid + ' not found.';
this.name = this.constructor.name;
Error.captureStackTrace(this, SessionNotFound);
}
SessionNotFound.prototype = new Error();
SessionNotFound.prototype.constructor = SessionNotFound;
function SessionExpired(sid) {
this.message = 'Session with session id ' + sid + ' has expired.';
this.name = this.constructor.name;
Error.captureStackTrace(this, SessionExpired);
}
SessionExpired.prototype = Object.create(SessionNotFound.prototype);
SessionExpired.prototype.constructor = SessionExpired;
exports.SessionNotFound = SessionNotFound;
exports.SessionExpired = SessionExpired;