Reporter: Add ExprRuntimeWarning()

...and update Expr.cc invalidation messages to use it. This aligns the
warning format to the one used by runtime errors.
This commit is contained in:
Arne Welzel 2022-11-29 15:03:53 +01:00
parent 0e97c29eb8
commit a07b0c333f
4 changed files with 26 additions and 28 deletions

View file

@ -112,6 +112,10 @@ public:
[[noreturn]] void RuntimeError(const detail::Location* location, const char* fmt, ...)
__attribute__((format(printf, 3, 4)));
// Report a rutnime warning in evaluating a Zeek script expression.
void ExprRuntimeWarning(const detail::Expr* expr, const char* fmt, ...)
__attribute__((format(printf, 3, 4)));
// Report a runtime error in executing a compiled script. This
// function will not return but raise an InterpreterException.
[[noreturn]] void CPPRuntimeError(const char* fmt, ...) __attribute__((format(printf, 2, 3)));