1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 10:24:26 +01:00

Improved error handling

This commit is contained in:
Ralf Ramsauer 2015-09-22 17:43:15 +02:00
parent 25c07e28a1
commit 09a1c613cc

View File

@ -144,20 +144,18 @@ int main(int argc, char** argv)
signal(SIGUSR1, signal_handler); signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler); signal(SIGUSR2, signal_handler);
l(LogLevel::info, "Starting Doorlock Logic");
logic = unique_ptr<Logic>(new Logic(tokenTimeout,
ldapUri,
bindDN,
lockPagePrefix,
serDev));
l(LogLevel::info, "Starting Doorlock Logic");
try { try {
logic = unique_ptr<Logic>(new Logic(tokenTimeout,
ldapUri,
bindDN,
lockPagePrefix,
serDev));
server(port); server(port);
} }
catch (const char* const &ex) { catch (...) {
ostringstream str; l(LogLevel::error, "Fatal error, shutting down");
str << "FATAL ERROR: " << ex;
l(str, LogLevel::error);
retval = -1; retval = -1;
goto out; goto out;
} }