Permalink
Browse files

throw an exception if arguments are passed to draopDatabase()

  • Loading branch information...
1 parent 2d61cb2 commit 9ff7fa1d895d2e72f87c73d99b12be38e0a044b5 @erh erh committed Jul 24, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 shell/db.js
View
@@ -121,6 +121,8 @@ DB.prototype.createCollection = function(name, opt) {
* @return Object returned has member ok set to true if operation succeeds, false otherwise.
*/
DB.prototype.dropDatabase = function() {
+ if ( arguments.length )
+ throw "dropDatabase doesn't take arguments";
return this._dbCommand( { dropDatabase: 1 } );
}

0 comments on commit 9ff7fa1

Please sign in to comment.