Make the ErrorHandler more resilient in case an exception is thrown during the error handling

This commit is contained in:
runebaas 2020-08-31 21:50:01 +02:00
parent ce1153a0e2
commit 81373b7614
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -70,8 +70,14 @@ namespace Geekbot.Core.ErrorHandling
}
catch (Exception ex)
{
await context.Channel.SendMessageAsync("Something went really really wrong here");
_logger.Error(LogSource.Geekbot, "Errorception", ex);
try
{
await context.Channel.SendMessageAsync("Something went really really wrong here");
}
finally
{
_logger.Error(LogSource.Geekbot, "Errorception", ex);
}
}
}