aboutsummaryrefslogtreecommitdiff
path: root/src/io/appium/droiddriver/helpers
diff options
context:
space:
mode:
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);
}
}