mirror of
https://github.com/NixOS/nix.git
synced 2025-11-10 12:36:01 +01:00
639 B
639 B
| synopsis | prs | |
|---|---|---|
| C API: Errors returned from your primops are not treated as recoverable by default |
|
Nix 2.32 by default remembers the error in the thunk that triggered it.
Previously the following sequence of events worked:
- Have a thunk that invokes a primop that's defined through the C API
- The primop returns an error
- Force the thunk again
- The primop returns a value
- The thunk evaluated successfully
Resolution
C API consumers that rely on this must change their recoverable error calls:
-nix_set_err_msg(context, NIX_ERR_*, msg);
+nix_set_err_msg(context, NIX_ERR_RECOVERABLE, msg);