Ignore:
Timestamp:
2016-06-24T01:27:35+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S1166 - Exception handlers should preserve the original exceptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r10408 r10469  
    378378            log.log(Level.FINE, "JCS - Caching empty object as server returned 404 for: {0}", getUrlNoException());
    379379            attributes.setResponseCode(404);
    380             attributes.setErrorMessage(e.toString());
     380            attributes.setError(e);
    381381            boolean doCache = isResponseLoadable(null, 404, null) || cacheAsEmpty();
    382382            if (doCache) {
     
    387387        } catch (IOException e) {
    388388            log.log(Level.FINE, "JCS - IOExecption during communication with server for: {0}", getUrlNoException());
    389             attributes.setErrorMessage(e.toString());
     389            attributes.setError(e);
    390390            attributes.setResponseCode(499); // set dummy error code
    391391            boolean doCache = isResponseLoadable(null, 499, null) || cacheAsEmpty(); //generic 499 error code returned
     
    396396            return doCache;
    397397        } catch (InterruptedException e) {
    398             attributes.setErrorMessage(e.toString());
     398            attributes.setError(e);
    399399            log.log(Level.WARNING, "JCS - Exception during download {0}", getUrlNoException());
    400400            Main.warn(e);
Note: See TracChangeset for help on using the changeset viewer.