mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 18:34:25 +01:00
Improved error handling
This commit is contained in:
parent
25c07e28a1
commit
09a1c613cc
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user