Ignore:
Timestamp:
2015-05-17T22:48:00+02:00 (9 years ago)
Author:
wiktorn
Message:

addresses #11437 - properly pass information about errors during load from cache to upper layers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java

    r8344 r8389  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.imagery;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.io.ByteArrayInputStream;
     
    273275                        }
    274276                    }
     277                    int httpStatusCode = attributes.getResponseCode();
     278                    if (!isNoTileAtZoom() && httpStatusCode >= 400) {
     279                        tile.setError(tr("HTTP error {0} when loading tiles", httpStatusCode));
     280                    }
    275281                    // no break intentional here
    276282                case REJECTED:
     
    313319                    tile.finishLoading();
    314320                }
     321                if (attributes.getResponseCode() >= 400) {
     322                    tile.setError(tr("HTTP error {0} when loading tiles", attributes.getResponseCode()));
     323                }
    315324                return tile;
    316325            } catch (IOException e) {
Note: See TracChangeset for help on using the changeset viewer.