catch polymorphic exceptions by const reference
This commit is contained in:
parent
d995f77b53
commit
1dff5eaf64
2 changed files with 7 additions and 7 deletions
|
|
@ -105,7 +105,7 @@ void HttpServer::handle() {
|
|||
Req req = getReq(connection);
|
||||
answ = _handler->handle(req, connection);
|
||||
answ.gzip = gzipSupport(req);
|
||||
} catch (HttpErr err) {
|
||||
} catch (const HttpErr& err) {
|
||||
answ = Answer(err.what(), err.what());
|
||||
} catch (...) {
|
||||
// catch everything to make sure the server continues running
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue