diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-10-20 16:20:22 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-10-20 16:20:22 -0400 |
commit | 4c856f6e8f664708cd8e03065430c9a61e454eb7 (patch) | |
tree | 4075630c7e43555c8ea53c32539cd61b19183f98 /shell | |
parent | 8615f7d1cd2a4443b4ae6d2ce478d638021cfcab (diff) | |
download | mongo-4c856f6e8f664708cd8e03065430c9a61e454eb7.tar.gz |
can't throw an exception...
Diffstat (limited to 'shell')
-rw-r--r-- | shell/collection.js | 7 |
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(){ |