tgbot-cpp
Loading...
Searching...
No Matches
TgException.h
Go to the documentation of this file.
1
#ifndef TGBOT_TGEXCEPTION_H
2
#define TGBOT_TGEXCEPTION_H
3
4
#include "
tgbot/export.h
"
5
6
#include <string>
7
#include <stdexcept>
8
9
namespace
TgBot
{
10
16
class
TGBOT_API
TgException
:
public
std::runtime_error {
17
18
public
:
19
23
enum class
ErrorCode
:
size_t
{
24
Undefined = 0,
25
BadRequest = 400, Unauthorized = 401,
26
Forbidden = 403, NotFound = 404,
27
Flood = 402, Internal = 500,
28
HtmlResponse = 100, InvalidJson = 101
29
};
30
31
explicit
TgException
(
const
std::string& description,
ErrorCode
errorCode);
32
33
const
ErrorCode
errorCode
;
34
};
35
36
}
37
38
#endif
//TGBOT_TGEXCEPTION_H
TgBot::TgException
Exception type which is only thrown when Telegram refuses API request.
Definition
TgException.h:16
TgBot::TgException::errorCode
const ErrorCode errorCode
Definition
TgException.h:33
TgBot::TgException::ErrorCode
ErrorCode
Enum of possible errors from Api requests.
Definition
TgException.h:23
TgBot::TgException::TgException
TgException(const std::string &description, ErrorCode errorCode)
export.h
TgBot
Definition
Api.h:40
include
tgbot
TgException.h
Generated on Tue Jun 11 2024 00:46:34 for tgbot-cpp by
1.11.0