refactor: rename MaxLengthException & fix naming

This commit is contained in:
ZavaruKitsu
2022-10-15 21:59:12 +03:00
parent fb51677429
commit 9400cfc74e
6 changed files with 33 additions and 30 deletions
+6 -6
View File
@@ -155,7 +155,7 @@ public class DeviceSession : IDeviceSession
if (text.Length > Constants.Telegram.MaxMessageLength)
{
throw new MaxLengthException(text.Length);
throw new MessageTooLongException(text.Length);
}
try
@@ -183,7 +183,7 @@ public class DeviceSession : IDeviceSession
{
if (text.Length > Constants.Telegram.MaxMessageLength)
{
throw new MaxLengthException(text.Length);
throw new MessageTooLongException(text.Length);
}
try
@@ -213,7 +213,7 @@ public class DeviceSession : IDeviceSession
if (message.Text.Length > Constants.Telegram.MaxMessageLength)
{
throw new MaxLengthException(message.Text.Length);
throw new MessageTooLongException(message.Text.Length);
}
try
@@ -270,7 +270,7 @@ public class DeviceSession : IDeviceSession
if (text.Length > Constants.Telegram.MaxMessageLength)
{
throw new MaxLengthException(text.Length);
throw new MessageTooLongException(text.Length);
}
if (parseMode == ParseMode.MarkdownV2 && markdownV2AutoEscape)
@@ -329,7 +329,7 @@ public class DeviceSession : IDeviceSession
if (text.Length > Constants.Telegram.MaxMessageLength)
{
throw new MaxLengthException(text.Length);
throw new MessageTooLongException(text.Length);
}
if (parseMode == ParseMode.MarkdownV2 && markdownV2AutoEscape)
@@ -372,7 +372,7 @@ public class DeviceSession : IDeviceSession
if (text.Length > Constants.Telegram.MaxMessageLength)
{
throw new MaxLengthException(text.Length);
throw new MessageTooLongException(text.Length);
}
if (parseMode == ParseMode.MarkdownV2 && markdownV2AutoEscape)