aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/lang/eval-fail-select-err.nix
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-06-24 17:26:21 -0600
committerQyriad <qyriad@qyriad.me>2024-07-04 17:43:03 -0600
commit4c7165be86e32cce4ca7eca59bd0ec2130bbb360 (patch)
tree9c43030bdb545d54687cd31ea62c4bcb7a84ad17 /tests/functional/lang/eval-fail-select-err.nix
parent14bf54bd393f1b48ba519d104abd53434fc18e75 (diff)
distinguish between throws & errors during throw
Turns errors like this: let throwMsg = a: throw (a + " invalid bar"); in throwMsg "bullshit" error: … from call site at «string»:3:4: 2| throwMsg = a: throw (a + " invalid bar"); 3| in throwMsg "bullshit" | ^ … while calling 'throwMsg' at «string»:2:14: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" … while calling the 'throw' builtin at «string»:2:17: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" error: bullshit invalid bar into errors like this: let throwMsg = a: throw (a + " invalid bar"); in throwMsg "bullshit" error: … from call site at «string»:3:4: 2| throwMsg = a: throw (a + " invalid bar"); 3| in throwMsg "bullshit" | ^ … while calling 'throwMsg' at «string»:2:14: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" … caused by explicit throw at «string»:2:17: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" error: bullshit invalid bar Change-Id: I593688928ece20f97999d1bf03b2b46d9ac338cb
Diffstat (limited to 'tests/functional/lang/eval-fail-select-err.nix')
-rw-r--r--tests/functional/lang/eval-fail-select-err.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/functional/lang/eval-fail-select-err.nix b/tests/functional/lang/eval-fail-select-err.nix
new file mode 100644
index 000000000..a7add0077
--- /dev/null
+++ b/tests/functional/lang/eval-fail-select-err.nix
@@ -0,0 +1,3 @@
+let
+ somepkg.src = throw "invalid foo bar";
+in somepkg.src.meta