private static DeleteDisksResponse checkDeleteDisksResponse(DeleteDisksResponse deleteDisksResponse) throws RpcException {
  logger.info("Checking {}",deleteDisksResponse);
switch (deleteDisksResponse.getResult()) {
case OK:
    break;
case SYSTEM_ERROR:
  throw new SystemErrorException(deleteDisksResponse.getError());
default :
throw new RpcException(String.format("Unknown response: %s",deleteDisksResponse.getResult()));
}
return deleteDisksResponse;
}

private static DeleteDisksResponse checkDeleteDisksResponse ( DeleteDisksResponse deleteDisksResponse ) throws RpcException { logger . info ( "Checking {}" , deleteDisksResponse ) ; switch ( deleteDisksResponse . getResult ( ) ) { case OK : break ; case SYSTEM_ERROR : throw new SystemErrorException ( deleteDisksResponse . getError ( ) ) ; default : throw new RpcException ( String . format ( "Unknown response: %s" , deleteDisksResponse . getResult ( ) ) ) ; } return deleteDisksResponse ; }
this method validates a deletedisksresponse object , raising an exception if the response reflects an operation failure .
