]
Lincoln Baxter III closed FORGE-1970.
-------------------------------------
Resolution: Won't Fix
Solved by fixing FORGE-1969
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
Fix For: 2.x Future
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 in {{org.jboss.forge.arquillian.ForgeTestMethodExecutor}}
{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.