deal with eval errors

This commit is contained in:
Joeri Exelmans 2025-05-27 10:56:14 +02:00
parent 32bdc23ea7
commit 4a4cee6ee9
5 changed files with 31 additions and 3 deletions

View file

@ -49,7 +49,10 @@ export function evalCall(s: CallBlockState, env: DynamicEnvironment): EvalResult
const fn = evalExpr(s.fn, env);
const input = evalExpr(s.input, env);
if (fn !== undefined && input !== undefined) {
return fn(input);
try {
return fn(input);
}
catch {}
}
}