tgbot-cpp
Toggle main menu visibility
Loading...
Searching...
No Matches
TgException.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
tgbot/export.h
"
4
5
#include <stdexcept>
6
#include <string>
7
8
namespace
TgBot
{
9
15
class
TGBOT_API
TgException
:
public
std::runtime_error {
16
public
:
20
enum class
ErrorCode
:
size_t
{
21
Undefined = 0,
22
BadRequest = 400,
23
Unauthorized = 401,
24
Forbidden = 403,
25
NotFound = 404,
26
Flood = 429,
27
Internal = 500,
28
HtmlResponse = 100,
29
InvalidJson = 101
30
};
31
32
TgException
(
const
std::string& description,
ErrorCode
errorCode
);
33
34
const
ErrorCode
errorCode
;
35
};
36
37
}
// namespace TgBot
TgBot::TgException::errorCode
const ErrorCode errorCode
Definition
TgException.h:34
TgBot::TgException::ErrorCode
ErrorCode
Enum of possible errors from Api requests.
Definition
TgException.h:20
TgBot::TgException::TgException
TgException(const std::string &description, ErrorCode errorCode)
export.h
TGBOT_API
#define TGBOT_API
Definition
export.h:5
TgBot
Definition
Api.h:17
include
tgbot
TgException.h
Generated on
for tgbot-cpp by
1.17.0