Response response = (Response) responseObject;
if (response instanceof ExceptionResponse) {
ExceptionResponse exceptionResponse = (ExceptionResponse) response;
Exception e = exceptionResponse.getException();
if (e instanceof SuspectException)
throw log.thirdPartySuspected(sender, (SuspectException) e);
if (e instanceof AvailabilityException)
throw e;
// if we have any application-level exceptions make sure we throw them!!
throw log.remoteException(sender, e);