private static AttachISOResponse checkAttachISOResponse(AttachISOResponse attachISOResponse) throws RpcException {
  logger.info("Checking {}",attachISOResponse);
switch (attachISOResponse.getResult()) {
case OK:
    break;
case SYSTEM_ERROR:
  throw new SystemErrorException(attachISOResponse.getError());
case VM_NOT_FOUND:
throw new VmNotFoundException(attachISOResponse.getError());
default :
throw new RpcException(String.format("Unknown result: %s",attachISOResponse.getResult()));
}
return attachISOResponse;
}

private static AttachISOResponse checkAttachISOResponse ( AttachISOResponse attachISOResponse ) throws RpcException { logger . info ( "Checking {}" , attachISOResponse ) ; switch ( attachISOResponse . getResult ( ) ) { case OK : break ; case SYSTEM_ERROR : throw new SystemErrorException ( attachISOResponse . getError ( ) ) ; case VM_NOT_FOUND : throw new VmNotFoundException ( attachISOResponse . getError ( ) ) ; default : throw new RpcException ( String . format ( "Unknown result: %s" , attachISOResponse . getResult ( ) ) ) ; } return attachISOResponse ; }
this method validates an attachisoresponse object , raising an exception if the response reflects an operation failure .
