This commit is contained in:
Tyrrrz
2021-09-16 01:08:14 +03:00
parent af11064a85
commit ea31b1b270
19 changed files with 67 additions and 98 deletions

View File

@@ -5,12 +5,12 @@ namespace DiscordChatExporter.Core.Exceptions
{
public partial class DiscordChatExporterException : Exception
{
public bool IsCritical { get; }
public bool IsFatal { get; }
public DiscordChatExporterException(string message, bool isCritical = false)
public DiscordChatExporterException(string message, bool isFatal = false)
: base(message)
{
IsCritical = isCritical;
IsFatal = isFatal;
}
}
@@ -31,7 +31,7 @@ Failed to perform an HTTP request.
}
internal static DiscordChatExporterException Unauthorized() =>
new("Authentication token is invalid.");
new("Authentication token is invalid.", true);
internal static DiscordChatExporterException Forbidden() =>
new("Access is forbidden.");