diff options
author | Kevin Jin <kjin@google.com> | 2014-04-01 10:01:42 -0700 |
---|---|---|
committer | Kevin Jin <kjin@google.com> | 2014-04-01 10:01:42 -0700 |
commit | b91b93ad4787c19d769d0e8f3c1660231d6e0687 (patch) | |
tree | 48f21b228a6701ae8405c434335347b6d5075219 /src/com | |
parent | d9ecc536e454bd4c23d6e0bbf5af1328e34b1748 (diff) | |
download | droiddriver-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.java | 4 |
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"); } }); } |