Changeset 15620 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2019-12-27T00:14:21+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #18466 - catch JsonParsingException when loading geojson files

File:
1 edited

Legend:

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

    r15499 r15620  
    2121import javax.json.stream.JsonParser;
    2222import javax.json.stream.JsonParser.Event;
     23import javax.json.stream.JsonParsingException;
    2324
    2425import org.openstreetmap.josm.data.coor.EastNorth;
     
    347348    protected DataSet doParseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
    348349        setParser(Json.createParser(source));
    349         parse();
     350        try {
     351            parse();
     352        } catch (JsonParsingException e) {
     353            throw new IllegalDataException(e);
     354        }
    350355        return getDataSet();
    351356    }
Note: See TracChangeset for help on using the changeset viewer.