Changeset 2240 in josm for trunk


Ignore:
Timestamp:
2009-10-03T16:57:49+02:00 (13 years ago)
Author:
Gubaer
Message:

fixed #3625: "Upload" error (410) while fetching items for relation

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

Legend:

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

    r2189 r2240  
    245245    public static void explainGoneForUnknownPrimitive(OsmApiException e) {
    246246        JOptionPane.showMessageDialog(Main.parent, ExceptionUtil.explainGoneForUnknownPrimitive(e),
    247                 tr("Primitive already deleted"), JOptionPane.ERROR_MESSAGE);
     247                tr("Object deleted"), JOptionPane.ERROR_MESSAGE);
    248248
    249249    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r2194 r2240  
    145145        ArrayList<Relation> relations = new ArrayList<Relation>(ds.relations.size());
    146146        for (Relation r: ds.relations ){
    147             if (r.isDeleted() || r.incomplete) {
     147            if (!r.isUsable() || !r.isVisible()) {
    148148                continue;
    149149            }
     
    492492        }
    493493    }
    494 
    495 
    496494}
  • trunk/src/org/openstreetmap/josm/io/OsmApiException.java

    r2189 r2240  
    6060        sb.append("ResponseCode=")
    6161        .append(responseCode);
    62         if (errorHeader != null) {
     62        if (errorHeader != null && !errorBody.trim().equals("")) {
    6363            sb.append(", Error Header=<")
    6464            .append(tr(errorHeader))
    6565            .append(">");
    6666        }
    67         if (errorBody != null) {
     67        if (errorBody != null && !errorBody.trim().equals("")) {
    6868            errorBody = errorBody.trim();
    6969            if(!errorBody.equals(errorHeader)) {
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r2228 r2240  
    277277     */
    278278    public static String explainGoneForUnknownPrimitive(OsmApiException e) {
    279         String msg = tr("<html>Uploading <strong>failed</strong> because a primitive you tried to<br>"
    280                 + "delete on the server is already deleted.<br>" + "<br>" + "The error message is:<br>" + "{0}"
     279        String msg = tr(
     280                "<html>The server reports that an object is deleted.<br>"
     281                + "<strong>Uploading failed</strong> if you tried to update or delete this object.<br> "
     282                + "<strong>Downloading failed</strong> if you tried to download this object.<br>"
     283                + "<br>"
     284                + "The error message is:<br>" + "{0}"
    281285                + "</html>", e.getMessage().replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;"));
    282286        return msg;
     
    290294     */
    291295    public static String explainException(Exception e) {
    292         if (e instanceof OsmTransferException)
    293             return explainOsmTransferException((OsmTransferException) e);
    294         return explainGeneric(e);
     296        String msg = "";
     297        if (e instanceof OsmTransferException) {
     298            msg = explainOsmTransferException((OsmTransferException) e);
     299        } else {
     300            msg = explainGeneric(e);
     301        }
     302        e.printStackTrace();
     303        return msg;
    295304    }
    296305}
Note: See TracChangeset for help on using the changeset viewer.