diff options
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/errors.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp | 2 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 3ba3404a8d12..3986640beb5f 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -162,7 +162,7 @@ impl ErrorKind { /// Returns `true` if this error can be caught by `builtins.tryEval` pub fn is_catchable(&self) -> bool { match self { - Self::Throw(_) | Self::AssertionFailed => true, + Self::Throw(_) | Self::AssertionFailed | Self::PathResolution(_) => true, Self::ThunkForce(err) => err.kind.is_catchable(), _ => false, } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp index 2b2e6fa711f4..770a5b6db405 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.exp @@ -1 +1 @@ -{ x = { success = true; value = "x"; }; y = { success = false; value = false; }; z = { success = false; value = false; }; } +{ w = { success = false; value = false; }; x = { success = true; value = "x"; }; y = { success = false; value = false; }; z = { success = false; value = false; }; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix index 629bc440a85a..8915032abd6f 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-tryeval.nix @@ -1,4 +1,5 @@ { + w = builtins.tryEval <nope>; x = builtins.tryEval "x"; y = builtins.tryEval (assert false; "y"); z = builtins.tryEval (throw "bla"); |