1
0
Fork 0
arangodb/js/apps/system/users/errors.js

24 lines
752 B
JavaScript

/*jslint indent: 2, nomen: true, maxlen: 120, es5: true */
/*global require, exports */
(function () {
'use strict';
function UserNotFound(uid) {
this.message = 'User with user id ' + uid + ' not found.';
var err = new Error(this.message);
err.name = this.constructor.name;
this.stack = err.stack;
}
UserNotFound.prototype = new Error();
function UsernameNotAvailable(username) {
this.message = 'The username ' + username + ' is not available or already taken.';
var err = new Error(this.message);
err.name = this.constructor.name;
this.stack = err.stack;
}
UsernameNotAvailable.prototype = new Error();
exports.UserNotFound = UserNotFound;
exports.UsernameNotAvailable = UsernameNotAvailable;
}());