about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorRyan Lahfa <tvl@lahfa.xyz>2023-12-25T23·41+0100
committerclbot <clbot@tvl.fyi>2024-01-03T18·09+0000
commitc7d6d0879941f285b61b4319afb720ba05ebb767 (patch)
tree9f38bf7f019b811f3cf361118e9c96cfe6470670 /tvix/eval/src
parent7dcb37fc52090636d542f9d8d0d45a00a5c24c55 (diff)
feat(tvix/eval): context-aware `throw` r/7325
Change-Id: Ie552dabe4cf93cc396c883268a3bee67796dbbd8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10429
Autosubmit: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/builtins/mod.rs3
1 files changed, 2 insertions, 1 deletions
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<Value, ErrorKind> {
         // 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(),
         )))
     }