From 831d96d8d79424595b955791dd007c3317b76b3d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 7 May 2024 09:13:58 +0200 Subject: [PATCH] builtins.warn: Do not throw EvalError --- src/libexpr/primops.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 459d19e05..9741e3177 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1056,7 +1056,8 @@ static void prim_warn(EvalState & state, const PosIdx pos, Value * * args, Value } if (evalSettings.builtinsAbortOnWarn) { - state.error("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("aborting to reveal stack trace of warning, as abort-on-warn is set").debugThrow(); } if (evalSettings.builtinsTraceDebugger || evalSettings.builtinsDebuggerOnWarn) { state.runDebugRepl(nullptr);