Commit 7e6c095
Treat exceptions during DefaultFailureHandler screenshots as suppressed exceptions
If an Espresso failure occurs, DefaultFailureHandler will capture a window
snapshot and take a screenshot.
However, if a RuntimeException occurs during this process, it will replace the
original exception.
An example is if there is an exception that occurs during a View's rendering
logic. The original exception will trigger DefaultFailureHandle's screenshot,
which may trigger a different exception, hiding the root cause.
PiperOrigin-RevId: 6012025891 parent c16d70f commit 7e6c095
File tree
2 files changed
+9
-2
lines changed- espresso
- core/java/androidx/test/espresso/base
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
0 commit comments