1
0
mirror of synced 2024-12-14 00:32:52 +01:00
ImHex/lib/libimhex/source/pattern_language/log_console.cpp
WerWolv 66d1b3fd2f
patterns: Huge refactor of Pattern Language runtime to use smart pointers (#458)
* patterns: Initial work to refactor pattern language to use smart pointers

* patterns: Fixed remaining issues, moved patterns to unique files

* sys: Added missing includes for macOS
2022-02-27 23:25:39 +01:00

14 lines
427 B
C++

#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) {
if (node == nullptr)
throw PatternLanguageError(0, "Evaluator: " + message);
else
throw PatternLanguageError(node->getLineNumber(), "Evaluator: " + message);
}
}