private <R> R blockOnResponse(BlockingRpcCallback<R> done, ServerRpcController controller) throws IOException { R response = done.get(); if(controller.failedOnException()) { throw controller.getFailedOn(); } if(controller.failed()) { String error = controller.errorText(); if(error == null) { error = "Server indicated failure but error text was empty"; } throw new RuntimeException(error); } return response; } private <R> R call(Batch.Call<RevisionManagerEndpointService, R> callable) throws IOException {