Files
lix/tests/functional2/repl_characterization/repl_basics/error.md
T
rootile ab8cdcc9b8 tests(f2/repl): migrate basic tests
Change-Id: I22241734a7249d376c86b3a226c5f1a82c03fd33
2026-06-11 16:19:20 +02:00

835 B

Errors at the top of an expression are printed normally:

builtins.throw "Evil puppy detected!!!"
error:
       … caused by explicit throw
         at «string»:1:1:
            1| builtins.throw "Evil puppy detected!!!"
             | ^

       error: Evil puppy detected!!!

Errors in attribute values are printed inline, to make it easier to explore values like nixpkgs where some parts of the value fail to evaluate:

{ puppy = builtins.throw "This puppy is EVIL!!!"; puppy2 = "This puppy is GOOD :)"; }
{
  puppy = «error: This puppy is EVIL!!!»;
  puppy2 = "This puppy is GOOD :)";
}

Same for list values:

[ (builtins.throw "This puppy is EVIL!!!") ("This puppy is GOOD :)") ]
[
  «error: This puppy is EVIL!!!»
  "This puppy is GOOD :)"
]