From 658f37f93d1a0c31c447adb3022cfd6cee4a1876 Mon Sep 17 00:00:00 2001 From: temomik Date: Fri, 1 Dec 2023 20:16:03 +0000 Subject: Added ability to handle error codes from all Api requests --- src/TgException.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/TgException.cpp') diff --git a/src/TgException.cpp b/src/TgException.cpp index e61e09c..7164ddc 100644 --- a/src/TgException.cpp +++ b/src/TgException.cpp @@ -4,7 +4,9 @@ namespace TgBot { -TgBot::TgException::TgException(const std::string& description) : runtime_error(description) { +TgException::TgException(const std::string& description, ErrorCode errorCode) + : runtime_error(description), errorCode(errorCode) +{ } } -- cgit v1.2.3