mirror of https://gitee.com/bigwinds/arangodb
Prettier stacks for users app errors.
This commit is contained in:
parent
19062d9d57
commit
c42628f0c5
|
@ -5,11 +5,17 @@
|
|||
|
||||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue