Message value = builder.build();
return value;
} else if (status == Status.ERROR) {
RpcException exceptionResponse = RpcException.parseDelimitedFrom(in);
RemoteException remoteException = new RemoteException(
exceptionResponse.getExceptionName(),
exceptionResponse.getStackTrace());
throw remoteException.unwrapRemoteException();
} else if (status == Status.FATAL) {
RpcException exceptionResponse = RpcException.parseDelimitedFrom(in);
// Close the connection
LOG.error("Fatal Exception.", exceptionResponse);
RemoteException remoteException = new RemoteException(
exceptionResponse.getExceptionName(),
exceptionResponse.getStackTrace());
throw remoteException.unwrapRemoteException();
} else {
throw new IOException("What happened?");
}
} catch (Exception e) {
if (e instanceof RemoteException) {