summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/dbcommands.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp
index f7e39afc2d4..0c6cb0dbc34 100644
--- a/db/dbcommands.cpp
+++ b/db/dbcommands.cpp
@@ -1169,7 +1169,9 @@ namespace mongo {
s->setObject( "obj" , obj , true );
s->setNumber( "n" , n - 1 );
- uassert( "reduce invoke failed" , s->invoke( f , BSONObj() , 0 , true ) == 0 );
+ if ( s->invoke( f , BSONObj() , 0 , true ) ){
+ throw UserException( (string)"reduce invoke failed: " + s->getError() );
+ }
}
result.appendArray( "retval" , s->getObject( "$arr" ) );