diff options
author | Dwight <dmerriman@gmail.com> | 2009-08-24 11:43:11 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-08-24 11:43:11 -0400 |
commit | bedc9f2ceb4c5085bf3ef9103de517183660d6c9 (patch) | |
tree | a95d75b208477e88697a725d5a8e6f478620a6b9 | |
parent | f67e06ba64115e4128f92fb798f46607b1a62fb5 (diff) | |
parent | 1681f080f05df5a04fc7228e66cf40494e345125 (diff) | |
download | mongo-bedc9f2ceb4c5085bf3ef9103de517183660d6c9.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r-- | db/dbcommands.cpp | 4 |
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" ) ); |