From 0bf85a7a812bef9eec097710f92c490c0ed9719a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 25 Aug 2023 10:32:41 +0530 Subject: feat: scoped try error handling with error property --- src/eval.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/eval.ts b/src/eval.ts index 0be3de5..17e27b1 100644 --- a/src/eval.ts +++ b/src/eval.ts @@ -326,7 +326,9 @@ const getFunctions = ( try { return await evalExpr(args[0], actions) } catch (e) { - return evalExpr(args[1], actions) + return actions.evaluateInScope([args[1]], { + '--error': EvalValue.Value(e), + }) } }, -- cgit v1.3.1