- Timestamp:
- 2021-05-25T15:54:33+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/importexport/GeoJSONImporter.java
r17646 r17913 8 8 import java.io.InputStream; 9 9 import java.util.Arrays; 10 import java.util.Locale; 10 11 12 import javax.json.JsonException; 11 13 import javax.swing.JOptionPane; 12 14 … … 23 25 import org.openstreetmap.josm.io.IllegalDataException; 24 26 import org.openstreetmap.josm.tools.Logging; 27 import org.openstreetmap.josm.tools.Utils; 25 28 26 29 /** … … 52 55 progressMonitor.worked(1); 53 56 MainApplication.getLayerManager().addLayer(new OsmDataLayer(data, file.getName(), file)); 54 } catch (IOException | IllegalArgumentException | IllegalDataException e) {57 } catch (IOException | IllegalArgumentException | IllegalDataException | JsonException e) { 55 58 Logging.error("Error while reading json file!"); 56 59 Logging.error(e); 57 GuiHelper.runInEDT(() -> JOptionPane.showMessageDialog( 58 null, tr("Error loading geojson file {0}", file.getAbsolutePath()), tr("Error"), JOptionPane.WARNING_MESSAGE)); 60 String message = tr("Error loading geojson file {0}", file.getAbsolutePath()) 61 + tr(" ({0})", Utils.getSizeString(file.length(), Locale.getDefault())); 62 GuiHelper.runInEDT(() -> JOptionPane.showMessageDialog(null, message, tr("Error"), JOptionPane.WARNING_MESSAGE)); 59 63 } finally { 60 64 progressMonitor.finishTask();
Note:
See TracChangeset
for help on using the changeset viewer.