1
0
mirror of synced 2024-12-14 16:52:53 +01:00
ImHex/lib/libimhex/source/pattern_language/log_console.cpp

14 lines
427 B
C++
Raw Normal View History

#include <hex/pattern_language/log_console.hpp>
#include <hex/pattern_language/ast/ast_node.hpp>
namespace hex::pl {
[[noreturn]] void LogConsole::abortEvaluation(const std::string &message, const ASTNode *node) {
2022-01-30 15:18:45 +01:00
if (node == nullptr)
2022-02-11 16:53:01 +01:00
throw PatternLanguageError(0, "Evaluator: " + message);
2022-01-30 15:18:45 +01:00
else
2022-02-11 16:53:01 +01:00
throw PatternLanguageError(node->getLineNumber(), "Evaluator: " + message);
}
}