cleaning exceptions

This commit is contained in:
Eliot Horowitz
2010-06-21 13:41:34 -04:00
parent e42ab71086
commit a71cc3cd4b
17 changed files with 123 additions and 92 deletions

View File

@@ -569,10 +569,15 @@ namespace mongo {
void QueryPlanSet::Runner::initOp( QueryOp &op ) {
try {
op.init();
} catch ( const std::exception &e ) {
op.setExceptionMessage( e.what() );
} catch ( ... ) {
op.setExceptionMessage( "Caught unknown exception" );
}
catch ( DBException& e ){
op.setException( e.getInfo() );
}
catch ( const std::exception &e ) {
op.setException( ExceptionInfo( e.what() , 0 ) );
}
catch ( ... ) {
op.setException( ExceptionInfo( "Caught unknown exception" , 0 ) );
}
}
@@ -580,11 +585,16 @@ namespace mongo {
try {
if ( !op.error() )
op.next();
} catch ( const std::exception &e ) {
op.setExceptionMessage( e.what() );
} catch ( ... ) {
op.setExceptionMessage( "Caught unknown exception" );
}
}
catch ( DBException& e ){
op.setException( e.getInfo() );
}
catch ( const std::exception &e ) {
op.setException( ExceptionInfo( e.what() , 0 ) );
}
catch ( ... ) {
op.setException( ExceptionInfo( "Caught unknown exception" , 0 ) );
}
}
MultiPlanScanner::MultiPlanScanner( const char *ns,