doorlockd: Improve error handling

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
Ralf Ramsauer 2016-07-17 22:29:31 +02:00
parent 34417b8ddb
commit 367afb4092
1 changed files with 8 additions and 0 deletions

View File

@ -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;