summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2009-08-24 11:43:11 -0400
committerDwight <dmerriman@gmail.com>2009-08-24 11:43:11 -0400
commitbedc9f2ceb4c5085bf3ef9103de517183660d6c9 (patch)
treea95d75b208477e88697a725d5a8e6f478620a6b9
parentf67e06ba64115e4128f92fb798f46607b1a62fb5 (diff)
parent1681f080f05df5a04fc7228e66cf40494e345125 (diff)
downloadmongo-bedc9f2ceb4c5085bf3ef9103de517183660d6c9.tar.gz
Merge branch 'master' of git@github.com:mongodb/mongo
-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" ) );