MantisBase v0.4.9
Loading...
Searching...
No Matches
exceptions.h
Go to the documentation of this file.
1
8
9#ifndef MANTISBASE_EXCEPTIONS_H
10#define MANTISBASE_EXCEPTIONS_H
11
12#include <exception>
13#include <string>
14#include "types.h"
15
16namespace mb {
23 class MANTISBASE_API MbException final : public std::exception {
24 public:
29 MbException(int _code, std::string _msg);
30
37 MbException(int _code, std::string _msg, std::string _desc);
38
39 [[nodiscard]] const char* what() const noexcept override;
40
42 [[nodiscard]] const char* desc() const noexcept;
43
45 [[nodiscard]] int code() const noexcept;
46
47 private:
48 int m_code = -1;
49 std::string m_msg, m_desc;
50 };
51} // mb
52
53#endif //MANTISBASE_EXCEPTIONS_H
int code() const noexcept
Definition exceptions.cpp:27
const char * desc() const noexcept
Definition exceptions.cpp:23
MbException(int _code, std::string _msg)
Definition exceptions.cpp:8
const char * what() const noexcept override
Definition exceptions.cpp:19
#define MANTISBASE_API
Definition export.h:31
Definition api_keys.h:35
Core type aliases, handler signatures, and the MbAppMixin DI mixin.