Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #60 from zanata/rhbz903964-better-error-msg
Browse files Browse the repository at this point in the history
rhbz903964 - try to display better error message if available
  • Loading branch information
Patrick Huang committed Apr 29, 2015
2 parents e64ddb5 + 025b1b2 commit a913fa5
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -443,6 +443,15 @@ public void visit(LocaleMapping locale,
qualifiedDocName(localDocName))
+ "\n\n.";
log.error(message);
if (e instanceof UniformInterfaceException) {
String entity =
((UniformInterfaceException) e).getResponse()
.getEntity(String.class);

throw new RuntimeException(String.format(
"%n * Error Message: %s;%n * Response From Server: %s]",
e.getMessage(), entity));
}
throw new RuntimeException(e.getMessage(), e);
}
}
Expand Down

0 comments on commit a913fa5

Please sign in to comment.