Permalink
Browse files

More readable error message

  • Loading branch information...
1 parent e057d87 commit d21701b7bac14581b5467a52b82117e076cd9140 @kriszyp kriszyp committed Jan 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/store/memory.js
View
@@ -47,7 +47,7 @@ exports.Memory = function(options){
}
if(object){
if(index.hasOwnProperty(object[i])){
- throw new Error("Unique key constraint error duplicate " + object[i] + " for key " + i);
+ throw new Error("Unique key constraint error duplicate " + JSON.stringify(object[i]) + " for key " + JSON.stringify(i));
}
index[object[i]] = object;
}

0 comments on commit d21701b

Please sign in to comment.