Search in sources :

Example 1 with ParseException

use of com.revolsys.geometry.wkb.ParseException in project com.revolsys.open by revolsys.

the class WKTReaderExpTest method readBad.

private void readBad(final String wkt) throws IOException {
    boolean threwParseEx = false;
    try {
        final Geometry g = this.rdr.read(wkt);
    } catch (final ParseException ex) {
        // System.out.println(ex.getMessage());
        threwParseEx = true;
    }
    assertTrue(threwParseEx);
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) ParseException(com.revolsys.geometry.wkb.ParseException)

Example 2 with ParseException

use of com.revolsys.geometry.wkb.ParseException in project com.revolsys.open by revolsys.

the class WKTReaderParseErrorTest method readBad.

private void readBad(final String wkt) throws IOException {
    boolean threwParseEx = false;
    try {
        final Geometry g = this.rdr.read(wkt);
    } catch (final ParseException ex) {
        // System.out.println(ex.getMessage());
        threwParseEx = true;
    }
    assertTrue(threwParseEx);
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) ParseException(com.revolsys.geometry.wkb.ParseException)

Aggregations

Geometry (com.revolsys.geometry.model.Geometry)2 ParseException (com.revolsys.geometry.wkb.ParseException)2