Ditto 4.5.1
Loading...
Searching...
No Matches
Errors.hpp
1#ifndef _DITTO_ERRORS_
2#define _DITTO_ERRORS_
3
4#include <exception>
5#include <string>
6
7struct dittoffi_error;
8typedef dittoffi_error dittoffi_error_t;
9
10namespace ditto {
11
18class DittoError : public std::exception {
19 std::string message;
20
21public:
22 DittoError();
23 DittoError(dittoffi_error_t *ffi_error);
24 explicit DittoError(std::string msg);
25
31 const char *what() const noexcept override;
32};
33} // namespace ditto
34
35#endif
All errors that are thrown by the Ditto SDK are wrapped as a DittoError.
Definition Errors.hpp:18
const char * what() const noexcept override
Returns the explanatory string.
Definition Errors.cpp:25