Skip to content

Commit

Permalink
Issue #4903 - add cause to Exception when creating endpoint instance
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed May 26, 2020
1 parent 470d948 commit c41560c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ public <T> T getEndpointInstance(Class<T> endpointClass) throws InstantiationExc
}
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;
}
}

Expand Down

0 comments on commit c41560c

Please sign in to comment.