Commit 7262292
committed
refactor(errortracking): clarify suppress log + test-stub comment
Address two of three Greptile review notes on PR #569:
1. The "skipping autocapture" log message previously read as if the
throwable's outermost class was always the matched ignoredType. A
cause-chain match would report e.g. `java.lang.RuntimeException` as
suppressed even when only `JavascriptException` was in the ignore
list. Reworded to surface that "the throwable or a cause in its
chain" matched.
2. The `ReactNativeJavascriptExceptionStub` doc comment claimed it was
"named the same way" as the real RN class — it isn't; the stub's
JVM name lives under the test class. Restated the actual design:
the stub's own FQCN is what tests register as the ignored value,
exercising the same code path without needing RN on the classpath.
Greptile's third note (parameterising the new tests) is intentionally
deferred — the individual test names ("skips capture when…", "still
captures when…", etc.) document distinct behaviours and read more
clearly than a `@ParameterizedTest` table would. Happy to revisit if
the maintainer prefers the table form.1 parent d005935 commit 7262292
2 files changed
Lines changed: 13 additions & 3 deletions
File tree
- posthog/src
- main/java/com/posthog/errortracking
- test/java/com/posthog/errortracking
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | | - | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| |||
0 commit comments