catch (ExchangeRuntimeException e)
{
Throwable inner = e.getCause();
if (inner instanceof HttpErrorException)
{
HttpErrorException httpError = (HttpErrorException) inner;
if (httpError.getErrorCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
{
System.out.println("There was an authentication error connecting to Exchange or HBase. "
+ "See the log for more details.");
}
else
{
System.out.println("There was an HTTP " + httpError.getErrorCode()
+ " error connection to either Exchange or HBase. "
+ "See the log for more details.");
}
}
else if (inner instanceof ServiceCallException)