mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
properly catch exceptions by reference
This commit is contained in:
parent
0348749de6
commit
c4ab3cbbcb
2 changed files with 3 additions and 3 deletions
|
@ -193,7 +193,7 @@ int main(int argc, char *argv[])
|
|||
return 0;
|
||||
|
||||
}
|
||||
catch (std::exception *e) {
|
||||
logger->error(e->what());
|
||||
catch (RuntimeError &e) {
|
||||
logger->error("{}", e.what());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ int protocol_cb(lws *wsi, enum lws_callback_reasons reason, void *user, void *in
|
|||
try {
|
||||
new (c) Connection(wsi);
|
||||
}
|
||||
catch (InvalidUrlException e) {
|
||||
catch (InvalidUrlException &e) {
|
||||
lws_close_reason(wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (unsigned char *) "Invalid URL", strlen("Invalid URL"));
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue