aboutsummaryrefslogtreecommitdiff
path: root/src/io/appium/droiddriver/helpers
diff options
context:
space:
mode:
authorKevin Jin <kjin@google.com>2015-03-06 11:30:46 -0800
committerKevin Jin <kjin@google.com>2015-03-06 11:41:13 -0800
commit1dbff05bf375557ea73e07632d732bd90a71af9e (patch)
tree9ad9578a09ee627b39f68c5c0128131ab32f4c03 /src/io/appium/droiddriver/helpers
parentb284da9483474581abc25a8cc822b4dadf2dfa34 (diff)
downloaddroiddriver-1dbff05bf375557ea73e07632d732bd90a71af9e.tar.gz
runOnMainSync on a single thread
Add DroidDriverException.propagate Change-Id: I7bdcbe1642b4448cc40a06995950573ebd890b4f
Diffstat (limited to 'src/io/appium/droiddriver/helpers')
-rw-r--r--src/io/appium/droiddriver/helpers/DroidDrivers.java16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/io/appium/droiddriver/helpers/DroidDrivers.java b/src/io/appium/droiddriver/helpers/DroidDrivers.java
index 5cddb4f..7725bf5 100644
--- a/src/io/appium/droiddriver/helpers/DroidDrivers.java
+++ b/src/io/appium/droiddriver/helpers/DroidDrivers.java
@@ -20,8 +20,6 @@ import android.annotation.TargetApi;
import android.app.Instrumentation;
import android.os.Build;
-import java.lang.reflect.InvocationTargetException;
-
import io.appium.droiddriver.DroidDriver;
import io.appium.droiddriver.exceptions.DroidDriverException;
import io.appium.droiddriver.instrumentation.InstrumentationDriver;
@@ -77,18 +75,8 @@ public class DroidDrivers {
try {
return (DroidDriver) Class.forName(driverClass).getConstructor(Instrumentation.class)
.newInstance(instrumentation);
- } catch (ClassNotFoundException e) {
- throw new DroidDriverException(e);
- } catch (NoSuchMethodException e) {
- throw new DroidDriverException(e);
- } catch (InstantiationException e) {
- throw new DroidDriverException(e);
- } catch (IllegalAccessException e) {
- throw new DroidDriverException(e);
- } catch (IllegalArgumentException e) {
- throw new DroidDriverException(e);
- } catch (InvocationTargetException e) {
- throw new DroidDriverException(e);
+ } catch (Throwable t) {
+ throw DroidDriverException.propagate(t);
}
}