summaryrefslogtreecommitdiff
path: root/db/dbcommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'db/dbcommands.cpp')
-rw-r--r--db/dbcommands.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp
index 57bc170d0f8..18a01d18e68 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" ) );