Issue #4903 - add cause to Exception when creating endpoint instance

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2020-05-26 15:35:39 +10:00
parent 470d948504
commit c41560c7cd
1 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,10 @@ public final class ContainerDefaultConfigurator extends Configurator
}
catch (Exception e)
{
throw new InstantiationException(String.format("%s: %s", e.getClass().getName(), e.getMessage()));
String errorMsg = String.format("%s: %s", e.getClass().getName(), e.getMessage());
InstantiationException instantiationException = new InstantiationException(errorMsg);
instantiationException.initCause(e);
throw instantiationException;
}
}