From 808d4ca420dce18ae0eac2e8cb3079c45f0fec04 Mon Sep 17 00:00:00 2001 From: wagesj45 Date: Thu, 21 Aug 2025 03:24:13 -0500 Subject: [PATCH] Surface ICodedFunction exceptions: set interpreter message via ProduceOutput in ExecuteFunction --- src/Core/InputInterpreter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Core/InputInterpreter.cs b/src/Core/InputInterpreter.cs index 8156c15..c9c31c1 100644 --- a/src/Core/InputInterpreter.cs +++ b/src/Core/InputInterpreter.cs @@ -186,8 +186,10 @@ namespace CSMic { return fn.Execute(args); } - catch + catch (Exception ex) { + // Surface function errors to the interpreter's message channel + ProduceOutput(0m, ex.Message); return new FunctionValue(FunctionValueType.None, null); } }