Catch all exception produced by a received message (irc or xmpp)
This commit is contained in:
1 parent
44b72b743e
commit
e971f64f92
2 files changed
+14
-2
No files matched your search
@@ -131,7 +131,13 @@ void XmppParser::char_data(const XML_Char* data, int len)
|
||||
void XmppParser::stanza_event(const Stanza& stanza) const
|
||||
{
|
||||
for (const auto& callback: this->stanza_callbacks)
|
||||
callback(stanza);
|
||||
{
|
||||
try {
|
||||
callback(stanza);
|
||||
} catch (const std::exception& e) {
|
||||
log_debug("Unhandled exception: " << e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void XmppParser::stream_open_event(const XmlNode& node) const
|
||||
|
||||
Reference in new issue
Block a user