Details
-
Enhancement
-
Resolution: Done
-
Major
-
drone_1.2.0.Alpha1
-
None
Description
org.jboss.arquillian.drone.webdriver.factory.SecurityActions.newInstance() catches a number of exceptions and rethrows them with better description hinting at what might be wrong with arquillian configuration. In the case of catching InvocationTargetException, more important is its cause, whose message describes the problem. However this piece of code:
} catch (InvocationTargetException e) { throw new RuntimeException( "Unable to instantiate Drone via " + getConstructorName(...), e.getCause()); }
will provide stack trace of the cause, but its message is not included, producing an exception looking like:
java.lang.RuntimeException: Unable to instantiate Drone via org.openqa.selenium.firefox.FirefoxDriver(Capabilities)
The exception handling code should be improved so that the message of InovcationTargetException's cause is included in the wrapping RuntimeException message.