aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorKevin Jin <kjin@google.com>2014-04-01 10:01:42 -0700
committerKevin Jin <kjin@google.com>2014-04-01 10:01:42 -0700
commitb91b93ad4787c19d769d0e8f3c1660231d6e0687 (patch)
tree48f21b228a6701ae8405c434335347b6d5075219 /src/com
parentd9ecc536e454bd4c23d6e0bbf5af1328e34b1748 (diff)
downloaddroiddriver-b91b93ad4787c19d769d0e8f3c1660231d6e0687.tar.gz
Always log uncaughtException
This is needed when the uncaughtException occurs in InstrumentationTestRunner Change-Id: If62e43e5cba2d6a98722c9c5c82c5896f7dd4355
Diffstat (limited to 'src/com')
-rw-r--r--src/com/google/android/droiddriver/helpers/BaseDroidDriverTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/google/android/droiddriver/helpers/BaseDroidDriverTest.java b/src/com/google/android/droiddriver/helpers/BaseDroidDriverTest.java
index 205eaa5..3725bbd 100644
--- a/src/com/google/android/droiddriver/helpers/BaseDroidDriverTest.java
+++ b/src/com/google/android/droiddriver/helpers/BaseDroidDriverTest.java
@@ -52,6 +52,10 @@ public abstract class BaseDroidDriverTest<T extends Activity> extends
@Override
public void uncaughtException(Thread thread, Throwable ex) {
uncaughtException = ex;
+ // In most cases uncaughtException will be reported by onFailure().
+ // But if it occurs in InstrumentationTestRunner, it's swallowed.
+ // Always log it for all cases.
+ Logs.log(Log.ERROR, uncaughtException, "uncaughtException");
}
});
}