mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-03 04:52:04 -04:00
Trap exceptions from process message
This commit is contained in:
@@ -291,7 +291,15 @@ public class ChatBot
|
||||
!InitialStartCooldown)
|
||||
{
|
||||
_logger.Debug("Passing message to command interface");
|
||||
_botCommands.ProcessMessage(message);
|
||||
try
|
||||
{
|
||||
_botCommands.ProcessMessage(message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Error("ProcessMessage threw an exception");
|
||||
_logger.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Update or add the element to keep it in sync
|
||||
|
||||
Reference in New Issue
Block a user