diff options
Diffstat (limited to 'tvix/eval/src/lib.rs')
-rw-r--r-- | tvix/eval/src/lib.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs index 8ce37de42732..845964cb7e00 100644 --- a/tvix/eval/src/lib.rs +++ b/tvix/eval/src/lib.rs @@ -301,7 +301,7 @@ where nix_path, self.io_handle, runtime_observer, - source, + source.clone(), globals, lambda, self.strict, @@ -310,6 +310,15 @@ where match vm_result { Ok(mut runtime_result) => { result.warnings.append(&mut runtime_result.warnings); + if let Value::Catchable(inner) = runtime_result.value { + result.errors.push(Error::new( + ErrorKind::CatchableError(*inner), + file.span, + source, + )); + return result; + } + result.value = Some(runtime_result.value); } Err(err) => { |