Ondrej Zizka created FORGE-1970:
-----------------------------------
Summary: Copy cause's message to InvocationTargetException
Key: FORGE-1970
URL:
https://issues.jboss.org/browse/FORGE-1970
Project: Forge
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Reporter: Ondrej Zizka
InvocationTargetException
in arquillian-forge-core appears without any message and with null cause. The cause is in
{target} property.
Then the logging frameworks do not show the additional information.
I suggest to either copy the error to the {cause} property, or at least to copy the
message.
I.e. change this
{code}
if (e.getCause() != null && e.getCause() instanceof
Exception)
throw (Exception) e.getCause();
else
throw e;
{code}
into something like
{code}
if (e.getCause() != null) {
if( e.getCause() instanceof Exception)
throw (Exception) e.getCause();
else{
e = new InvocationTargetException( target, target.getMessage);
// And some reflection to set the cause.
throw e;
}
}
{code}
I would make a PR, but I didn't find where the repo for arq-forge-core is.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)