mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
catch exceptions in webserver SERVER-551
This commit is contained in:
parent
036e6f7ba8
commit
069d9e9c3c
@ -153,7 +153,20 @@ namespace mongo {
|
||||
string responseMsg;
|
||||
int responseCode = 599;
|
||||
vector<string> headers;
|
||||
doRequest(buf, parseURL( buf ), responseMsg, responseCode, headers, from);
|
||||
|
||||
try {
|
||||
doRequest(buf, parseURL( buf ), responseMsg, responseCode, headers, from);
|
||||
}
|
||||
catch ( std::exception& e ){
|
||||
responseCode = 500;
|
||||
responseMsg = "error loading page: ";
|
||||
responseMsg += e.what();
|
||||
}
|
||||
catch ( std::exception& e ){
|
||||
responseCode = 500;
|
||||
responseMsg = "error loading page: ";
|
||||
responseMsg += e.what();
|
||||
}
|
||||
|
||||
stringstream ss;
|
||||
ss << "HTTP/1.0 " << responseCode;
|
||||
|
Loading…
Reference in New Issue
Block a user