tgbot-cpp
Loading...
Searching...
No Matches
TgBot::TgException Class Reference

Exception type which is only thrown when Telegram refuses API request. More...

#include <TgException.h>

Inheritance diagram for TgBot::TgException:

Public Types

enum class  ErrorCode : size_t {
  Undefined = 0 , BadRequest = 400 , Unauthorized = 401 , Forbidden = 403 ,
  NotFound = 404 , Flood = 402 , Internal = 500 , HtmlResponse = 100 ,
  InvalidJson = 101
}
 Enum of possible errors from Api requests. More...
 

Public Member Functions

 TgException (const std::string &description, ErrorCode errorCode)
 

Public Attributes

const ErrorCode errorCode
 

Detailed Description

Exception type which is only thrown when Telegram refuses API request.

Definition at line 16 of file TgException.h.

Member Enumeration Documentation

◆ ErrorCode

enum class TgBot::TgException::ErrorCode : size_t
strong

Enum of possible errors from Api requests.

Enumerator
Undefined 
BadRequest 
Unauthorized 
Forbidden 
NotFound 
Flood 
Internal 
HtmlResponse 
InvalidJson 

Definition at line 23 of file TgException.h.

Constructor & Destructor Documentation

◆ TgException()

TgBot::TgException::TgException ( const std::string & description,
ErrorCode errorCode )
explicit

Member Data Documentation

◆ errorCode

const ErrorCode TgBot::TgException::errorCode

Definition at line 33 of file TgException.h.


The documentation for this class was generated from the following file: