From 367afb40925fabfbfee57b0dbc6bc1b929c62973 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Sun, 17 Jul 2016 22:29:31 +0200 Subject: [PATCH] doorlockd: Improve error handling Signed-off-by: Ralf Ramsauer --- doorlockd/daemon/doorlockd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doorlockd/daemon/doorlockd.cpp b/doorlockd/daemon/doorlockd.cpp index 92b983b..5977645 100644 --- a/doorlockd/daemon/doorlockd.cpp +++ b/doorlockd/daemon/doorlockd.cpp @@ -248,6 +248,14 @@ int main(int argc, char** argv) onClientMessage)); server(port); } + catch (const boost::system::system_error &ex) { + l(LogLevel::error, "Fatal error: %s", ex.what()); + retval = -1; + } + catch (const std::exception &ex) { + l(LogLevel::error, "Fatal error: %s", ex.what()); + retval = -1; + } catch (...) { l(LogLevel::error, "Fatal error, shutting down"); retval = -1;