MajMcCloud / TelegramBotFramework

This is a context based application framework for the C# TelegramBot library.
https://www.t.me/tgbotbase
MIT License
149 stars 43 forks source link

Added the ReceiveError event to MessageClient to provide the ability to handle exceptions in client code #51

Closed contributeless closed 9 months ago

contributeless commented 9 months ago

Hello everyone! I've found Console.WriteLine calls in code and this doesn't work for me, because I have structured json logging via Serilog and raw Console logging breaks my log scrapper. So i need a mechanism that will catch an exception and handle it the way i need.

I left the same behaviour as it was before for old clients, so it is not a breaking change at all.

Please accept the PR)

Egorkas commented 9 months ago

+1 for this feature

CoderSwift commented 9 months ago

+1

VerbitskiA commented 9 months ago

+1

MajMcCloud commented 9 months ago

Accepted! Thank you for your PR.