mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-29 18:49:53 +03:00
Notify user when a command execution error occurs (#171)
With this PR, whenever command execution fails, the user will get an error message with details of the error that can be passed on to developers An unrelated minor change: errors caused by task cancellations will no longer be logged --------- Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com> Signed-off-by: mctaylors <mctaylxrs@outlook.com>
This commit is contained in:
parent
5b84c8d8d0
commit
fb3aebb1e0
6 changed files with 74 additions and 3 deletions
|
@ -26,6 +26,11 @@ public static class LoggerExtensions
|
|||
|
||||
if (result.Error is ExceptionError exe)
|
||||
{
|
||||
if (exe.Exception is TaskCanceledException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogError(exe.Exception, "{ErrorMessage}", message);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue