Skip to content

Commit

Permalink
add more info about errors when crateInstanceFromJson geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Sep 25, 2024
1 parent ffba5d1 commit 615a015
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce
try {
return new MultiPoint(json.get(POINTS_TAG).getAsString());
} catch (Exception e) {
LOGGER.error(e.getClass().getSimpleName() + " " + e.getMessage());
throw new ArcgisException("Unable to parse MultiPoint from json " + e.getMessage());
LOGGER.error(e.getClass().getSimpleName() + " error " + e.getMessage() + " parsing MultiPoint from json " + json);
throw new ArcgisException("Unable to parse MultiPoint from json " + json + " due to " + e.getMessage());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce

return new Point(x, y, SpatialReference.WGS84);
} catch (Exception e) {
LOGGER.error(e.getClass().getSimpleName() + " " + e.getMessage());
throw new ArcgisException("Unable to parse Point from json " + e.getMessage());
LOGGER.error(e.getClass().getSimpleName() + " error " + e.getMessage() + " parsing Point from json " + json);
throw new ArcgisException("Unable to parse Point from json " + json + " due to " + e.getMessage());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce
try {
return new PolyLine(json.get(PATHS_TAG).getAsString());
} catch (Exception e) {
LOGGER.error(e.getClass().getSimpleName() + " " + e.getMessage());
throw new ArcgisException("Unable to parse PolyLine from json " + e.getMessage());
LOGGER.error(e.getClass().getSimpleName() + " error " + e.getMessage() + " parsing PolyLine from json " + json);
throw new ArcgisException("Unable to parse PolyLine from json " + json + " due to " + e.getMessage());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce
try {
return new Polygon(json.get(RINGS_TAG).getAsString());
} catch (Exception e) {
LOGGER.error(e.getClass().getSimpleName() + " " + e.getMessage());
throw new ArcgisException("Unable to parse Polygon from json " + e.getMessage());
LOGGER.error(e.getClass().getSimpleName() + " error " + e.getMessage() + " parsing Polygon from json " + json);
throw new ArcgisException("Unable to parse Polygon from json " + json + " due to " + e.getMessage());
}

}
Expand Down

0 comments on commit 615a015

Please sign in to comment.