[arquillian-issues] [JBoss JIRA] (ARQ-1314) Better exception message when creating a new instance fails

Jiri Locker (JIRA) jira-events at lists.jboss.org
Tue Feb 26 05:19:57 EST 2013


Jiri Locker created ARQ-1314:
--------------------------------

             Summary: 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: Karel Piwko


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: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list