File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -189,18 +189,20 @@ namespace mongo {
189189 Database* db = cc ().database ();
190190 Collection* collection = db->getCollection ( ns );
191191
192- if ( !collection ) {
193- errmsg = " ns does not exist " ;
194- return false ;
195- }
196-
192+ if ( !collection )
193+ return appendCommandStatus ( result,
194+ Status ( ErrorCodes::NamespaceNotFound,
195+ str::stream () <<
196+ " ns does not exist: " << ns. ns () ) );
197197
198198 size_t numCursors = static_cast <size_t >( cmdObj[" numCursors" ].numberInt () );
199199
200- if ( numCursors == 0 || numCursors > 10000 ) {
201- errmsg = " numCursors has to be between 1 and 10000" ;
202- return false ;
203- }
200+ if ( numCursors == 0 || numCursors > 10000 )
201+ return appendCommandStatus ( result,
202+ Status ( ErrorCodes::BadValue,
203+ str::stream () <<
204+ " numCursors has to be between 1 and 10000" <<
205+ " was: " << numCursors ) );
204206
205207 vector< vector<ExtentInfo> > buckets;
206208
You can’t perform that action at this time.
0 commit comments