fix: m/r emit error gets spidermonkey into bad state SERVER-570
This commit is contained in:
@@ -818,7 +818,15 @@ namespace mongo {
|
||||
|
||||
a = args.obj();
|
||||
}
|
||||
BSONObj out = func( a );
|
||||
|
||||
BSONObj out;
|
||||
try {
|
||||
out = func( a );
|
||||
}
|
||||
catch ( std::exception& e ){
|
||||
JS_ReportError( cx , e.what() );
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
if ( out.isEmpty() ){
|
||||
*rval = JSVAL_VOID;
|
||||
|
||||
Reference in New Issue
Block a user