MantisBase v0.3.4
Loading...
Searching...
No Matches
exceptions.h
Go to the documentation of this file.
1
9#ifndef MANTISBASE_EXCEPTIONS_H
10#define MANTISBASE_EXCEPTIONS_H
11
12#include <exception>
13#include <string>
14
15namespace mb {
16 class MantisException final : public std::exception {
17 public:
18 MantisException(int _code, std::string _msg);
19
20 MantisException(int _code, std::string _msg, std::string _desc);
21
22 [[nodiscard]] const char* what() const noexcept override;
23
24 [[nodiscard]] const char* desc() const noexcept;
25
26 [[nodiscard]] int code() const noexcept;
27
28 private:
29 int m_code = -1;
30 std::string m_msg, m_desc;
31 };
32} // mb
33
34#endif //MANTISBASE_EXCEPTIONS_H
Definition exceptions.h:16
const char * desc() const noexcept
Definition exceptions.cpp:23
int code() const noexcept
Definition exceptions.cpp:27
const char * what() const noexcept override
Definition exceptions.cpp:19
router.h
Definition auth.h:15