Cavoke
1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
cavoke_base_exception.h
1
#ifndef CAVOKE_CAVOKE_BASE_EXCEPTION_H
2
#define CAVOKE_CAVOKE_BASE_EXCEPTION_H
3
4
#include <nlohmann/json.hpp>
5
#include <stdexcept>
6
7
namespace
cavoke::server {
9
struct
cavoke_base_exception
: std::runtime_error {
10
public
:
11
enum
error_code {
12
UnknownError = 0,
13
InvalidClientInput,
14
NotFound,
15
InvalidConfig
16
};
17
18
cavoke_base_exception
(std::string message,
19
error_code code,
20
std::string tag =
"cavoke"
);
21
22
private
:
23
std::string message;
24
error_code code;
25
NLOHMANN_DEFINE_TYPE_INTRUSIVE(
cavoke_base_exception
, code, message);
26
};
27
28
}
// namespace cavoke::server
29
30
#endif
// CAVOKE_CAVOKE_BASE_EXCEPTION_H
cavoke::server::cavoke_base_exception
Base exception for errors thrown in server.
Definition:
cavoke_base_exception.h:9
server
cavoke_base_exception.h
Generated by
1.9.6