aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocoder/JsonGeocoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geocoder/JsonGeocoder.java')
-rw-r--r--src/org/traccar/geocoder/JsonGeocoder.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/org/traccar/geocoder/JsonGeocoder.java b/src/org/traccar/geocoder/JsonGeocoder.java
index 80123e01e..ed59a1d8d 100644
--- a/src/org/traccar/geocoder/JsonGeocoder.java
+++ b/src/org/traccar/geocoder/JsonGeocoder.java
@@ -64,10 +64,11 @@ public abstract class JsonGeocoder implements Geocoder {
}
return formattedAddress;
} else {
+ String msg = "Empty address. Error: " + parseError(json);
if (callback != null) {
- callback.onFailure(new GeocoderException("Empty address"));
+ callback.onFailure(new GeocoderException(msg));
} else {
- LOGGER.warn("Empty address");
+ LOGGER.warn(msg);
}
}
return null;
@@ -113,4 +114,8 @@ public abstract class JsonGeocoder implements Geocoder {
public abstract Address parseAddress(JsonObject json);
+ protected String parseError(JsonObject json) {
+ return null;
+ }
+
}