diff --git a/espresso/core/java/androidx/test/espresso/IdlingPolicy.java b/espresso/core/java/androidx/test/espresso/IdlingPolicy.java index a250fcd35..be73e31fd 100644 --- a/espresso/core/java/androidx/test/espresso/IdlingPolicy.java +++ b/espresso/core/java/androidx/test/espresso/IdlingPolicy.java @@ -63,7 +63,7 @@ public void handleTimeout(List busyResources, String message) { AppNotIdleException.create(busyResources, message); try { TestOutputEmitter.dumpThreadStates("ThreadState-AppNotIdleException.txt"); - } catch (RuntimeException e) { + } catch (RuntimeException | Error e) { appNotIdleException.addSuppressed(e); } throw appNotIdleException;