6#define ERROR_FOR_REASON(reason) \
7 class reason : public Error { \
9 explicit reason(const char* message) : Error(Reason::reason, message) {} \
12namespace MdlParser::Errors {
13 enum class Reason : uint8_t {
21 class Error :
public std::runtime_error {
23 Error(Reason reason,
const char* message) : reason(reason), std::runtime_error(message) {}
33 ERROR_FOR_REASON(InvalidHeader);
34 ERROR_FOR_REASON(InvalidBody);
35 ERROR_FOR_REASON(InvalidChecksum);
36 ERROR_FOR_REASON(UnsupportedVersion);
37 ERROR_FOR_REASON(OutOfBoundsAccess);
Definition: errors.hpp:21