Permalink
Browse files

Fix error codes

  • Loading branch information...
kriszyp committed Feb 17, 2010
1 parent 01c1084 commit f466e82054b6baaafd949c2fffa1fadae19fbf79
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/errors.js
View
@@ -23,7 +23,13 @@ var DatabaseError = exports.DatabaseError = function(code,message){
DatabaseError.prototype = new Error();
var NotFoundError = exports.NotFoundError = function(message){
- DatabaseError.call(this, 3, message);
+ DatabaseError.call(this, 2, message);
this.name = "NotFoundError";
};
NotFoundError.prototype = new DatabaseError();
+
+var PreconditionFailed = exports.PreconditionFailed = function(message){
+ DatabaseError.call(this, 3, message);
+ this.name = "PreconditionFailed";
+};
+PreconditionFailed.prototype = new DatabaseError();

0 comments on commit f466e82

Please sign in to comment.