public static GetConfigResponse checkGetConfigResponse(GetConfigResponse getConfigResponse) throws RpcException {
  logger.info("Checking {}",getConfigResponse);
switch (getConfigResponse.getResult()) {
case OK:
    break;
case SYSTEM_ERROR:
  throw new SystemErrorException(getConfigResponse.getError());
default :
throw new RpcException(String.format("Unknown result: %s",getConfigResponse.getResult()));
}
return getConfigResponse;
}

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