0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

better assert

This commit is contained in:
Eliot Horowitz 2010-04-12 10:57:58 -04:00
parent 230e8cae8b
commit 0a1bed6f5e

View File

@ -58,7 +58,11 @@ namespace mongo {
doQuery( r , r.singleServerName() );
}
catch ( AssertionException& e ) {
if ( lateAssert ){
log() << "lateAssert: " << e.msg << endl;
assert( !lateAssert );
}
BSONObjBuilder err;
err.append("$err", string("mongos: ") + (e.msg.empty() ? "assertion during query" : e.msg));
BSONObj errObj = err.done();