Add reminders for error reporting improvements

This commit is contained in:
Noi 2020-05-22 00:27:31 -07:00
parent a91e22ca71
commit 48481e0379
4 changed files with 7 additions and 2 deletions

View file

@ -87,9 +87,10 @@ namespace BirthdayBot
if (exs != null)
{
Program.Log(LogName, $"{exs.InnerExceptions.Count} exception(s) during background task execution:");
// TODO webhook log
foreach (var iex in exs.InnerExceptions)
{
Program.Log(LogName, iex.Message);
Program.Log(LogName, iex.ToString());
}
}
else

View file

@ -137,7 +137,9 @@ namespace BirthdayBot
try
{
channel.SendMessageAsync(":x: An unknown error occurred. It has been reported to the bot owner.").Wait();
} catch (HttpException ex2)
// TODO webhook report
}
catch (HttpException)
{
// Fail silently.
}

View file

@ -79,6 +79,7 @@ namespace BirthdayBot.UserInterface
{
Program.Log("Listing", ex.ToString());
reqChannel.SendMessageAsync(":x: An internal error occurred. It has been reported to the bot owner.").Wait();
// TODO webhook report
}
finally
{

View file

@ -136,6 +136,7 @@ namespace BirthdayBot.UserInterface
{
Program.Log("Error", ex.ToString());
reqChannel.SendMessageAsync(":x: An unknown error occurred. The bot owner has been notified.").Wait();
// TODO webhook report
return;
}
if (known)