Changeset 18634 in josm for trunk/src/org


Ignore:
Timestamp:
2023-01-16T16:52:10+01:00 (2 years ago)
Author:
taylor.smock
Message:

Fix #22638: NoSuchFileException can occur when a gpx track points at non-existent images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java

    r18613 r18634  
    55
    66import java.awt.event.ActionEvent;
     7import java.io.UncheckedIOException;
    78import java.net.URI;
    89import java.net.URISyntaxException;
     
    6768        } catch (URISyntaxException e) {
    6869            Logging.trace(e);
    69             new Notification(tr("Malformed URI: ", this.imageUrl.toExternalForm())).setIcon(JOptionPane.WARNING_MESSAGE).show();
     70            new Notification(tr("Malformed URI: {0}", this.imageUrl.toExternalForm())).setIcon(JOptionPane.WARNING_MESSAGE).show();
     71        } catch (UncheckedIOException e) {
     72            Logging.trace(e);
     73            new Notification(tr("IO Exception: {0}\n{1}", this.imageUrl.toExternalForm(), e.getCause().getMessage()))
     74                    .setIcon(JOptionPane.WARNING_MESSAGE).show();
    7075        }
    7176        return null;
Note: See TracChangeset for help on using the changeset viewer.