Ignore:
Timestamp:
2010-03-11T00:58:51+01:00 (16 years ago)
Author:
pieren
Message:

improve download cancellation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r19267 r20412  
    6565    final  int cRetriesGetCookie = 10; // 10 times every 3 seconds means 30 seconds trying to get a cookie
    6666
    67     public boolean retrieveInterface(WMSLayer wmsLayer) throws DuplicateLayerException {
     67    public boolean retrieveInterface(WMSLayer wmsLayer) throws DuplicateLayerException, WMSException {
    6868        if (wmsLayer.getName().equals(""))
    6969            return false;
     
    7575            if (cookie == null || isCookieExpired())
    7676                getCookie();
    77             if (cookie != null && interfaceRef == null) {
     77            if (cookie == null)
     78                throw new WMSException(tr("Cannot open a new client session.\nServer in maintenance or temporary overloaded."));
     79            if (interfaceRef == null) {
    7880                    getInterface(wmsLayer);
    7981                    this.lastWMSLayerName = wmsLayer.getName();
    80             } else {
    81                 JOptionPane.showMessageDialog(Main.parent,
    82                         tr("Cannot open a new client session.\nServer in maintenance or temporary overloaded."));
    83                 return false;
    8482            }
    8583            openInterface();
Note: See TracChangeset for help on using the changeset viewer.