Changeset 9486 in josm for trunk/src


Ignore:
Timestamp:
2016-01-16T14:16:03+01:00 (4 years ago)
Author:
simon04
Message:

Note upload: explain first exception to the user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java

    r9067 r9486  
    1414import org.openstreetmap.josm.data.notes.NoteComment;
    1515import org.openstreetmap.josm.data.osm.NoteData;
     16import org.openstreetmap.josm.gui.ExceptionDialogUtil;
    1617import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1718import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    118119            } catch (Exception e) {
    119120                Main.error("Failed to upload note to server: " + note.getId());
     121                Main.error(e);
    120122                failedNotes.put(note, e);
    121123            }
     
    130132            noteData.updateNotes(updatedNotes);
    131133            if (!failedNotes.isEmpty()) {
    132                 Main.error("Some notes failed to upload");
    133134                StringBuilder sb = new StringBuilder();
    134135                for (Map.Entry<Note, Exception> entry : failedNotes.entrySet()) {
     
    138139                Main.error("Notes failed to upload: " + sb.toString());
    139140                JOptionPane.showMessageDialog(Main.map, sb.toString(), tr("Notes failed to upload"), JOptionPane.ERROR_MESSAGE);
     141                ExceptionDialogUtil.explainException(failedNotes.values().iterator().next());
    140142            }
    141143        }
Note: See TracChangeset for help on using the changeset viewer.