Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1314

Better exception message when creating a new instance fails

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            jlocker Jiří Locker
            jlocker Jiří Locker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: