Skip to content

Commit

Permalink
SERVER-13812 Catch exception thrown by getShardsForQuery for geo query
Browse files Browse the repository at this point in the history
  • Loading branch information
visualzhou committed May 2, 2014
1 parent 8d48e78 commit 1616926
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mongo/s/chunk_manager_targeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ namespace mongo {

set<Shard> shards;
if ( _manager ) {
_manager->getShardsForQuery( shards, query );
try {
_manager->getShardsForQuery( shards, query );
} catch ( const DBException& ex ) {
return ex.toStatus();
}
}
else {
shards.insert( *_primary );
Expand Down

0 comments on commit 1616926

Please sign in to comment.