Provide more context in exception messages

This commit is contained in:
Tyrrrz
2023-11-16 21:10:24 +02:00
parent a46bf9bf11
commit e89701e3f9
5 changed files with 33 additions and 19 deletions

View File

@@ -105,7 +105,7 @@ public static class ExportWrapper
if (message is null)
{
throw new InvalidOperationException(
$"Message '{messageId}' does not exist in the export of channel '{channelId}'."
$"Message #{messageId} does not exist in the export of channel #{channelId}."
);
}
@@ -129,7 +129,7 @@ public static class ExportWrapper
if (message.ValueKind == JsonValueKind.Undefined)
{
throw new InvalidOperationException(
$"Message '{messageId}' does not exist in the export of channel '{channelId}'."
$"Message #{messageId} does not exist in the export of channel #{channelId}."
);
}