mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 06:22:42 +01:00
7 lines
279 B
Nix
7 lines
279 B
Nix
# Since Nix 2.32, errors are memoized
|
|
let
|
|
# This attribute value will only be evaluated once.
|
|
foo = builtins.trace "throwing" throw "nope";
|
|
in
|
|
# Trigger and catch the error twice.
|
|
builtins.seq (builtins.tryEval foo).success builtins.seq (builtins.tryEval foo).success "done"
|