1
0
mirror of synced 2024-11-30 18:34:29 +01:00
ImHex/lib/libimhex/include/hex/pattern_language/error.hpp
2022-02-01 22:09:44 +01:00

27 lines
594 B
C++

#pragma once
#include <hex.hpp>
#include <stdexcept>
#include <string>
namespace hex::pl {
class PatternLanguageError : public std::exception {
public:
PatternLanguageError(u32 lineNumber, std::string message) : m_lineNumber(lineNumber), m_message(std::move(message)) { }
[[nodiscard]] const char *what() const noexcept override {
return this->m_message.c_str();
}
[[nodiscard]] u32 getLineNumber() const {
return this->m_lineNumber;
}
private:
u32 m_lineNumber;
std::string m_message;
};
}