summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-10-20 16:20:22 -0400
committerEliot Horowitz <eliot@10gen.com>2009-10-20 16:20:22 -0400
commit4c856f6e8f664708cd8e03065430c9a61e454eb7 (patch)
tree4075630c7e43555c8ea53c32539cd61b19183f98 /shell
parent8615f7d1cd2a4443b4ae6d2ce478d638021cfcab (diff)
downloadmongo-4c856f6e8f664708cd8e03065430c9a61e454eb7.tar.gz
can't throw an exception...
Diffstat (limited to 'shell')
-rw-r--r--shell/collection.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/shell/collection.js b/shell/collection.js
index 83cc98f9716..13212811177 100644
--- a/shell/collection.js
+++ b/shell/collection.js
@@ -255,19 +255,14 @@ DBCollection.prototype.ensureIndex = function( keys , options ){
var name = this._indexSpec( keys, options ).name;
this._indexCache = this._indexCache || {};
if ( this._indexCache[ name ] ){
- return false;
+ return;
}
this.createIndex( keys , options );
- var e = this._db.getLastError();
- if ( e != null )
- throw e;
-
if ( this.getDB().getLastError() == "" ) {
this._indexCache[name] = true;
}
- return true;
}
DBCollection.prototype.resetIndexCache = function(){