mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-24 17:34:13 +00:00
Add reminders for error reporting improvements
This commit is contained in:
parent
a91e22ca71
commit
48481e0379
4 changed files with 7 additions and 2 deletions
|
@ -87,9 +87,10 @@ namespace BirthdayBot
|
||||||
if (exs != null)
|
if (exs != null)
|
||||||
{
|
{
|
||||||
Program.Log(LogName, $"{exs.InnerExceptions.Count} exception(s) during background task execution:");
|
Program.Log(LogName, $"{exs.InnerExceptions.Count} exception(s) during background task execution:");
|
||||||
|
// TODO webhook log
|
||||||
foreach (var iex in exs.InnerExceptions)
|
foreach (var iex in exs.InnerExceptions)
|
||||||
{
|
{
|
||||||
Program.Log(LogName, iex.Message);
|
Program.Log(LogName, iex.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -137,7 +137,9 @@ namespace BirthdayBot
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
channel.SendMessageAsync(":x: An unknown error occurred. It has been reported to the bot owner.").Wait();
|
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.
|
// Fail silently.
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ namespace BirthdayBot.UserInterface
|
||||||
{
|
{
|
||||||
Program.Log("Listing", ex.ToString());
|
Program.Log("Listing", ex.ToString());
|
||||||
reqChannel.SendMessageAsync(":x: An internal error occurred. It has been reported to the bot owner.").Wait();
|
reqChannel.SendMessageAsync(":x: An internal error occurred. It has been reported to the bot owner.").Wait();
|
||||||
|
// TODO webhook report
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
@ -136,6 +136,7 @@ namespace BirthdayBot.UserInterface
|
||||||
{
|
{
|
||||||
Program.Log("Error", ex.ToString());
|
Program.Log("Error", ex.ToString());
|
||||||
reqChannel.SendMessageAsync(":x: An unknown error occurred. The bot owner has been notified.").Wait();
|
reqChannel.SendMessageAsync(":x: An unknown error occurred. The bot owner has been notified.").Wait();
|
||||||
|
// TODO webhook report
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (known)
|
if (known)
|
||||||
|
|
Loading…
Reference in a new issue