builtins.warn: Do not throw EvalError

This commit is contained in:
Robert Hensing 2024-05-07 09:13:58 +02:00
parent c07500e14d
commit 831d96d8d7

View file

@ -1056,7 +1056,8 @@ static void prim_warn(EvalState & state, const PosIdx pos, Value * * args, Value
}
if (evalSettings.builtinsAbortOnWarn) {
state.error<Abort>("aborting to reveal stack trace of warning, as abort-on-warn is set").debugThrow();
// Not an EvalError or subclass, which would cause the error to be stored in the eval cache.
state.error<Error>("aborting to reveal stack trace of warning, as abort-on-warn is set").debugThrow();
}
if (evalSettings.builtinsTraceDebugger || evalSettings.builtinsDebuggerOnWarn) {
state.runDebugRepl(nullptr);