dwm: Catch IPCError instead of generic exceptions
Don't catch generic exceptions to avoid masking bugs. Only catch IPCError exceptions since those are all minor errors.
This commit is contained in:
parent
871b9f8ba2
commit
4533cf5003
@ -153,7 +153,7 @@ namespace modules {
|
||||
} catch (const dwmipc::SocketClosedError& err) {
|
||||
m_log.err("%s: Disconnected from socket: %s", name(), err.what());
|
||||
return reconnect_dwm();
|
||||
} catch (const exception& err) {
|
||||
} catch (const dwmipc::IPCError& err) {
|
||||
m_log.err("%s: Failed to handle event (reason: %s)", name(), err.what());
|
||||
}
|
||||
return false;
|
||||
@ -403,7 +403,7 @@ namespace modules {
|
||||
m_log.notice("%s: Successfully reconnected event to socket", name());
|
||||
}
|
||||
return true;
|
||||
} catch (const exception& err) {
|
||||
} catch (const dwmipc::IPCError& err) {
|
||||
m_log.err("%s: Failed to reconnect to socket: %s", name(), err.what());
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user