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::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::ErrorCode::NotFound
@ NotFound
Definition
TgException.h:26
TgBot::TgException::ErrorCode::InvalidJson
@ InvalidJson
Definition
TgException.h:28
TgBot::TgException::ErrorCode::Flood
@ Flood
Definition
TgException.h:27
TgBot::TgException::ErrorCode::Forbidden
@ Forbidden
Definition
TgException.h:26
TgBot::TgException::ErrorCode::BadRequest
@ BadRequest
Definition
TgException.h:25
TgBot::TgException::ErrorCode::Internal
@ Internal
Definition
TgException.h:27
TgBot::TgException::ErrorCode::Unauthorized
@ Unauthorized
Definition
TgException.h:25
TgBot::TgException::ErrorCode::Undefined
@ Undefined
Definition
TgException.h:24
TgBot::TgException::ErrorCode::HtmlResponse
@ HtmlResponse
Definition
TgException.h:28
TgBot::TgException::TgException
TgException(const std::string &description, ErrorCode errorCode)
export.h
TgBot
Definition
Api.h:40
include
tgbot
TgException.h
Generated on
for tgbot-cpp by
1.14.0