From c7d6d0879941f285b61b4319afb720ba05ebb767 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Tue, 26 Dec 2023 00:41:13 +0100 Subject: feat(tvix/eval): context-aware `throw` Change-Id: Ie552dabe4cf93cc396c883268a3bee67796dbbd8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10429 Autosubmit: raitobezarius Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/builtins/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tvix') diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index eaa1d1f98d..2f317dbf9d 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -1122,8 +1122,9 @@ mod pure_builtins { #[builtin("throw")] async fn builtin_throw(co: GenCo, message: Value) -> Result { // TODO(sterni): coerces to string + // We do not care about the context here explicitly. Ok(Value::Catchable(CatchableErrorKind::Throw( - message.to_str()?.to_string(), + message.to_contextful_str()?.to_string(), ))) } -- cgit 1.4.1