コード例 #1
0
  private void logError(Throwable e) {

    if (Log.isDebugEnabled()) {

      Log.debug("Error during version check from remote site.", e);
    }
  }
コード例 #2
0
  public String getReleaseNotes() {

    if (siteAvailable()) {

      Log.info("Downloading latest release notes from http://executequery.org");

      try {

        RemoteHttpClient httpClient = remoteHttpClient();
        RemoteHttpResponse response =
            httpClient.httpGetRequest(ADDRESS, releaseNotesUrl().getPath());

        return response.getResponse();

      } catch (MalformedURLException e) {

        handleException(e);

      } catch (RemoteHttpClientException e) {

        logError(e);
      }
    }

    throw new ApplicationException(ioErrorMessage());
  }
コード例 #3
0
  private boolean siteAvailable() {

    try {

      return remoteHttpClient().hostReachable(ADDRESS);

    } catch (Exception e) {

      Log.error(e.getMessage(), e);
      throw new ApplicationException(ioErrorMessage());
    }
  }