We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d106076 commit 51cee6dCopy full SHA for 51cee6d
doc/manual/rl-next/c-api-recoverable-errors.md
@@ -0,0 +1,23 @@
1
+---
2
+synopsis: "C API: Errors returned from your primops are not treated as recoverable by default"
3
+prs: [13930]
4
5
+
6
+Nix 2.32 by default remembers the error in the thunk that triggered it.
7
8
+Previously the following sequence of events worked:
9
10
+1. Have a thunk that invokes a primop that's defined through the C API
11
+2. The primop returns an error
12
+3. Force the thunk again
13
+4. The primop returns a value
14
+5. The thunk evaluated successfully
15
16
+**Resolution**
17
18
+C API consumers that rely on this must change their recoverable error calls:
19
20
+```diff
21
+-nix_set_err_msg(context, NIX_ERR_*, msg);
22
++nix_set_err_msg(context, NIX_ERR_RECOVERABLE, msg);
23
+```
0 commit comments