placemarkt / address-formatter-java

Maven package for formatting data in the OpenStreetMaps address field generated by the Nominatim API.
MIT License
7 stars 0 forks source link

Improved JSON Error handling #3

Closed machajdik closed 2 years ago

machajdik commented 2 years ago

In method AddressFormatter.format(String, String) when a JsonProcessingException occurs, a new IOException is generated. Please also add the original Exception to the new Exception:

    try {
       components = yamlReader.readValue(json, type);
    } catch (JsonProcessingException e) {
      throw(new IOException("Json processing exception", e));
    }

many thanks!

rkoeze commented 2 years ago

@machajdik Thank you! I'll take a look this week.

rkoeze commented 2 years ago

@machajdik Fix here: https://github.com/placemarkt/address-formatter-java/pull/4

I'll ping you again and close this issue when it gets deployed.

rkoeze commented 2 years ago

Just finished deploying. It may take a bit more time to sync with Maven Central. I will close this issue when it does. Thanks!