diff options
Diffstat (limited to 's/server.cpp')
-rw-r--r-- | s/server.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/s/server.cpp b/s/server.cpp index 5c6ac9b..11f688c 100644 --- a/s/server.cpp +++ b/s/server.cpp @@ -92,10 +92,12 @@ namespace mongo { r.process(); } catch ( DBException& e ){ + log() << "DBException in process: " << e.what() << endl; + le->raiseError( e.getCode() , e.what() ); m.header()->id = r.id(); - log() << "UserException: " << e.what() << endl; + if ( r.expectResponse() ){ BSONObj err = BSON( "$err" << e.what() << "code" << e.getCode() ); replyToQuery( ResultFlag_ErrSet, p , m , err ); |