mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-15 10:32:44 -04:00
Trap exceptions from process message
This commit is contained in:
@@ -291,7 +291,15 @@ public class ChatBot
|
|||||||
!InitialStartCooldown)
|
!InitialStartCooldown)
|
||||||
{
|
{
|
||||||
_logger.Debug("Passing message to command interface");
|
_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
|
// Update or add the element to keep it in sync
|
||||||
|
|||||||
Reference in New Issue
Block a user