Better exception message when creating a new instance fails
-----------------------------------------------------------
Key: ARQ-1314
URL:
https://issues.jboss.org/browse/ARQ-1314
Project: Arquillian
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: Extension - Drone
Affects Versions: drone_1.2.0.Alpha1
Reporter: Jiri Locker
Assignee: Jiri Locker
Fix For: drone_1.2.0.Alpha2
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:
{code:java}
} catch (InvocationTargetException e) {
throw new RuntimeException(
"Unable to instantiate Drone via " + getConstructorName(...),
e.getCause());
}
{code}
will provide stack trace of the cause, but its message is not included, producing an
exception looking like:
{noformat}java.lang.RuntimeException: Unable to instantiate Drone via
org.openqa.selenium.firefox.FirefoxDriver(Capabilities)
{noformat}
The exception handling code should be improved so that the message of
InovcationTargetException's cause is included in the wrapping RuntimeException
message.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: