This repository was archived by the owner on Nov 11, 2025. It is now read-only.
Commit fd93e12
Remove exception handling of PyObject* return values in CLIF callbacks
If an exception has occurred in the py-callback (-> `PyObject* = nullptr` is returned) the caller must handle the exception. This change removes the exception handling from `ReturnValue<PyObject*>` and offloads this responsibility on the caller. Previously, the exception signal was cleared in the call to `HandlePyExc()` which prohibits the user from handling the exception, while still returning `nullptr` and implicitly signalling that there was an error.
Tested: `blaze test third_party/clif/... devtools/clif/...` and
`tap_presubmit -p all --train -c 493233664`: https://test.corp.google.com/OCL:493233664:BASE:493182079:1670319490310:bf766ad9 + rerun https://test.corp.google.com/OCL:493233664:BASE:493182079:1670337211526:88c1b8f1
PiperOrigin-RevId: 4935711211 parent cbadf2a commit fd93e12
File tree
4 files changed
+20
-3
lines changed- clif
- python
- testing
- python
4 files changed
+20
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
| 382 | + | |
385 | 383 | | |
386 | 384 | | |
387 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
0 commit comments