Error handling: Difference between revisions

imported>Carschandler
m The previous example for config.warnings was returning a list inside of a list, which doesn't work properly
Axka (talk | contribs)
m Fix link "Nix manual: Assertions"
 
Line 19: Line 19:
The nix language has a construct to help with printing messages.
The nix language has a construct to help with printing messages.


* '''assert''': throw an error (see [https://nixos.org/manual/nix/stable/language/constructs.html?highlight=assert#assertions Nix manual: Assertions])
* '''assert''': throw an error (see [https://nixos.org/manual/nix/stable/language/syntax.html?highlight=assert#assertions Nix manual: Assertions])


The nix language also comes with some related [https://nixos.org/manual/nix/stable/language/builtins.html builtin functions]:
The nix language also comes with some related [https://nixos.org/manual/nix/stable/language/builtins.html builtin functions]: