private void handleCannotConnectException(CannotConnectException ex) { logger.warn("Cannot connect", ex); Throwable t = ex.getCause(); String message = ""; while (t != null) { if (t instanceof ConnectException) { message = "Server is likely offline." + message; break; } if (t instanceof SocketException) { message = "Check your internet connection." + message; break; } if (t instanceof SocketTimeoutException) { message = "Server is not responding." + message; break; } if (t.getCause() != null && logger.isDebugEnabled()) { message = '\n' + t.getCause().getMessage() + message; logger.debug(t.getCause().getMessage()); } t = t.getCause(); } client.showMessage("Unable connect to server. " + message); if (logger.isTraceEnabled()) { logger.trace("StackTrace", t); } }
throw new CannotConnectException("Can not connect http client invoker.", e);
throw new SystemException(e.toString());
} catch (CannotConnectException e) { throw new CannotConnectToAgentException("Error adding [" + resourceType + "] Resource to inventory as " + "a child of " + parentResource + " - cause: " + e.getMessage(), e); } catch (RuntimeException e) { throw new RuntimeException("Error adding [" + resourceType + "] Resource to inventory as a child of "
throw new CannotConnectException("Server stub has not been set."); throw new CannotConnectException("Can not connect http client invoker.", cause); throw new CannotConnectException("Error making invocation in RMI client invoker.", e);
throw new SystemException(e.toString());
throw new CannotConnectException(message, savedException);
throw new CannotConnectException("Can not connect http client invoker.", cause);
sockEx = new CannotConnectException( "Can not get connection to server. Problem establishing " + "socket connection for " + locator, e); sockEx = new CannotConnectException( "Can not get connection to server. Timed out establishing " + "socket connection for " + locator);