Changeset 2825 in josm


Ignore:
Timestamp:
2010-01-12T08:58:43+01:00 (15 years ago)
Author:
Gubaer
Message:

fixed #4328: No visible error message when trying to upload to a closed changeset

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r2801 r2825  
    316316                if (lastException instanceof ChangesetClosedException) {
    317317                    ChangesetClosedException e = (ChangesetClosedException)lastException;
     318                    if (e.getSource().equals(ChangesetClosedException.Source.UPDATE_CHANGESET)) {
     319                        handleFailedUpload(lastException);
     320                        return;
     321                    }
    318322                    if (strategy.getPolicy() == null)
    319323                        /* do nothing if unknown policy */
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r2748 r2825  
    2222import java.util.Collections;
    2323import java.util.HashMap;
     24import java.util.logging.Logger;
    2425
    2526import javax.xml.parsers.ParserConfigurationException;
     
    4748 */
    4849public class OsmApi extends OsmConnection {
     50    static private final Logger logger = Logger.getLogger(OsmApi.class.getName());
    4951    /** max number of retries to send a request in case of HTTP 500 errors or timeouts */
    5052    static public final int DEFAULT_MAX_NUM_RETRIES = 5;
     
    579581                case HttpURLConnection.HTTP_GONE:
    580582                    throw new OsmApiPrimitiveGoneException(errorHeader, errorBody);
    581                     //                case HttpURLConnection.HTTP_UNAUTHORIZED:
    582                     //                    throw new OsmApiException(retCode, errorHeader, errorBody);
    583                     //                case HttpURLConnection.HTTP_PROXY_AUTH:
    584                     //                    throw new OsmApiException(retCode, errorHeader, errorBody);
    585                     //                case HttpURLConnection.HTTP_FORBIDDEN:
    586                     //                    throw new OsmApiException(retCode, errorHeader, errorBody);
    587583                case HttpURLConnection.HTTP_CONFLICT:
    588584                    if (ChangesetClosedException.errorHeaderMatchesPattern(errorHeader))
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r2711 r2825  
    121121        } catch(OsmTransferException e) {
    122122            throw e;
    123         } catch(Exception e) {
    124             throw new OsmTransferException(e);
    125123        } finally {
    126124            progressMonitor.finishTask();
     
    161159        } catch(OsmTransferException e) {
    162160            throw e;
    163         } catch(Exception e) {
    164             throw new OsmTransferException(e);
    165161        } finally {
    166162            progressMonitor.finishTask();
     
    207203        } catch(OsmTransferException e) {
    208204            throw e;
    209         } catch(Exception e) {
    210             throw new OsmTransferException(e);
    211205        } finally {
    212206            monitor.finishTask();
Note: See TracChangeset for help on using the changeset viewer.