public static RpcException mapException(RpcException ex, FailureType failureType) { if (failureType == RpcConnectionHandler.FailureType.CONNECTION) { return new ConnectionFailedException(ex); } return ex; } }
@Override public void connectionFailed(FailureType type, Throwable t) { settableFuture.setException( ConnectionFailedException.mapException(RpcException.mapException( String.format("Command failed while establishing connection. Failure type %s.", type), t), type)); }
@Override public void connectionFailed(FailureType type, Throwable t) { listener.failed( ConnectionFailedException.mapException(RpcException.mapException( String.format("Command failed while establishing connection. Failure type %s.", type), t), type)); }
@Override public void connectionFailed(FailureType type, Throwable t) { getInner().setException(ConnectionFailedException.mapException( new RpcException(String.format("%s : %s", type.name(), t.getMessage()), t), type)); }