Changeset 2128


Ignore:
Timestamp:
08/22/12 08:45:15 (12 years ago)
Author:
oschonef
Message:
  • change exception message
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUClient/trunk/src/main/java/eu/clarin/sru/client/SRUClient.java

    r2114 r2128  
    431431        HttpResponse response = null;
    432432        try {
    433             logger.debug("executing HTTP request: {}", uri.toString());
     433            logger.debug("performing HTTP request: {}", uri.toString());
    434434            try {
    435435                request = new HttpGet(uri);
     
    448448                throw new SRUClientException("client protocol exception", e);
    449449            } catch (UnknownHostException e) {
    450                 throw new SRUClientException("unknown host: " + uri.getHost(),
    451                         e);
     450                throw new SRUClientException(
     451                        "unknown host: " + uri.getHost(), e);
    452452            } catch (IOException e) {
    453                 throw new SRUClientException("input/output error", e);
     453                String msg = null;
     454                if ((e.getMessage() != null) && !e.getMessage().isEmpty()) {
     455                    msg = e.getMessage();
     456                }
     457                throw new SRUClientException(msg != null
     458                        ? msg
     459                        : "input/output error", e);
    454460            }
    455461        } catch (SRUClientException e) {
Note: See TracChangeset for help on using the changeset viewer.