Skip to content

Commit

Permalink
BVTCK-188 Also take into account the suppressed exceptions
Browse files Browse the repository at this point in the history
Let's be on the safe side.
  • Loading branch information
gsmet committed Jan 24, 2018
1 parent 7fc0840 commit 3af967f
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -95,6 +95,13 @@ private static Exception extractAcceptedDeploymentException(Class<? extends Exce
}
}

for ( Throwable suppressedException : exception.getSuppressed() ) {
Exception acceptedDeploymentException = extractAcceptedDeploymentException( acceptedDeploymentExceptionType, suppressedException );
if ( acceptedDeploymentException != null ) {
return acceptedDeploymentException;
}
}

// in the case of Weld, the wrapped exceptions are simply stored in the message, so we check for the exception
// class name in the message and we try to forge an exception with a constructor taking a String parameter
if ( exception.getMessage().contains( acceptedDeploymentExceptionType.getName() ) ) {
Expand Down

0 comments on commit 3af967f

Please sign in to comment.