Commit dad4348
Fix run_benchmark_once: message(<condition>) escapes tryCatch under testthat
The tryCatch handlers in run_benchmark_once() called `message(e)` where
`e` is the caught condition. R's `message()` re-signals any condition
passed to it. Under testthat's calling handlers, signaling an error
condition is treated as a test error β which escapes the tryCatch
even though tryCatch *did* catch it.
This caused test-run_benchmark to fail on GitHub Actions whenever the
g:Profiler API returned malformed JSON (e.g. for fruit fly β human).
The all_genes() and convert_orthologs() calls were supposed to record
NA and continue, but the test errored at line 9 instead.
Fix: pass `conditionMessage(e)` (a plain string) to `message()` so it
prints the message text without re-signaling the condition.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f977afd commit dad4348
3 files changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
1 | 14 | | |
2 | 15 | | |
3 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
0 commit comments