query
On this page

throw

builtins.throw

Primop
Docs pulled from | This Revision | 8 minutes ago

Takes 1 arguments

s


Throw an error message s. This usually aborts Nix expression evaluation, but in nix-env -qa and other commands that try to evaluate a set of derivations to get information about those derivations, a derivation that throws an error is silently skipped (which is not the case for abort).

This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.

Noogle detected

Detected Type
throw :: String -> Never

Implementation

This function is implemented in c++ and is part of the native nix runtime.