Skip to content

Commit

Permalink
Merge pull request #549 from yamass/master
Browse files Browse the repository at this point in the history
Fixed toMojoFailureException() when e.getCause() is null
  • Loading branch information
eirslett committed Jan 8, 2017
2 parents 58009c2 + 75e8d61 commit f1edb47
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -24,7 +24,8 @@ class MojoUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(MojoUtils.class);

static <E extends Throwable> MojoFailureException toMojoFailureException(E e) {
return new MojoFailureException(e.getMessage() + ": " + e.getCause().getMessage(), e);
String causeMessage = e.getCause() != null ? ": " + e.getCause().getMessage() : "";
return new MojoFailureException(e.getMessage() + causeMessage, e);
}

static ProxyConfig getProxyConfig(MavenSession mavenSession, SettingsDecrypter decrypter) {
Expand Down

0 comments on commit f1edb47

Please sign in to comment.