diff --git a/src/villas-node.cpp b/src/villas-node.cpp index 017003284..91568425f 100644 --- a/src/villas-node.cpp +++ b/src/villas-node.cpp @@ -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()); } } diff --git a/src/villas-relay.cpp b/src/villas-relay.cpp index 283b59a17..99ffd273a 100644 --- a/src/villas-relay.cpp +++ b/src/villas-relay.cpp @@ -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; }