diff --git a/MedocUpdates/MedocTelegram.cs b/MedocUpdates/MedocTelegram.cs index dfa5809..b7be32c 100644 --- a/MedocUpdates/MedocTelegram.cs +++ b/MedocUpdates/MedocTelegram.cs @@ -47,7 +47,8 @@ public MedocTelegram() botClient.OnInlineResultChosen += BotClient_OnInlineResultChosen; botClient.OnMessage += OnMessageReceived; botClient.OnReceiveError += BotClient_OnReceiveError; - + botClient.OnReceiveGeneralError += BotClient_OnReceiveGeneralError; + try { Log.Write(LogLevel.NORMAL, "MedocTelegram: Client begins to receive updates..."); @@ -112,6 +113,12 @@ private void BotClient_OnReceiveError(object sender, ReceiveErrorEventArgs e) Log.Write(LogLevel.NORMAL, "MedocTelegram: OnReceiveError()\r\n" + e.ApiRequestException.Message); } + private void BotClient_OnReceiveGeneralError(object sender, ReceiveGeneralErrorEventArgs e) + { + //throw new NotImplementedException(); + Log.Write(LogLevel.NORMAL, "MedocTelegram: OnReceiveGeneralError()\r\n" + e.Exception.Message + "\r\n" + e.Exception.StackTrace); + } + private bool IsSubscribed(long chatID) { return TelegramChatsStorage.TelegramChats.IndexOf(chatID) >= 0;