diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-09-10T05·02-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-09-24T21·54+0000 |
commit | 05f42519b53575ad3235b5e0a0cd7d71f04076a5 (patch) | |
tree | 82c5bdb55450615c0cf3169e25668426c9798e09 /tvix/eval/src/builtins/to_xml.rs | |
parent | 926459ce694536432c36d8f0d3fb25b821945852 (diff) |
fix(tvix/eval): fix b/281 by adding Value::Catchable r/6650
This commit makes catchable errors a variant of Value. The main downside of this approach is that we lose the ability to use Rust's `?` syntax for propagating catchable errors. Change-Id: Ibe89438d8a70dcec29e016df692b5bf88a5cad13 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9289 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/builtins/to_xml.rs')
-rw-r--r-- | tvix/eval/src/builtins/to_xml.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/to_xml.rs b/tvix/eval/src/builtins/to_xml.rs index 9fb6bb5f5175..6d486d356518 100644 --- a/tvix/eval/src/builtins/to_xml.rs +++ b/tvix/eval/src/builtins/to_xml.rs @@ -134,6 +134,10 @@ fn value_variant_to_xml<W: Write>(w: &mut EventWriter<W>, value: &Value) -> Resu metadata: Some(Rc::new(value.clone())), }) } + + Value::Catchable(_) => { + panic!("tvix bug: value_to_xml() called on a value which had not been deep-forced") + } }?; Ok(()) |