aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/geocoder/GoogleGeocoder.java2
-rw-r--r--src/org/traccar/geocoder/JsonGeocoder.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/geocoder/GoogleGeocoder.java b/src/org/traccar/geocoder/GoogleGeocoder.java
index 23a08b6e2..9494cab45 100644
--- a/src/org/traccar/geocoder/GoogleGeocoder.java
+++ b/src/org/traccar/geocoder/GoogleGeocoder.java
@@ -91,7 +91,7 @@ public class GoogleGeocoder extends JsonGeocoder {
}
@Override
- protected String getError(JsonObject json) {
+ protected String parseError(JsonObject json) {
return json.getString("error_message");
}
diff --git a/src/org/traccar/geocoder/JsonGeocoder.java b/src/org/traccar/geocoder/JsonGeocoder.java
index 3a0175dae..ed59a1d8d 100644
--- a/src/org/traccar/geocoder/JsonGeocoder.java
+++ b/src/org/traccar/geocoder/JsonGeocoder.java
@@ -64,7 +64,7 @@ public abstract class JsonGeocoder implements Geocoder {
}
return formattedAddress;
} else {
- String msg = "Empty address. " + getError(json);
+ String msg = "Empty address. Error: " + parseError(json);
if (callback != null) {
callback.onFailure(new GeocoderException(msg));
} else {
@@ -114,8 +114,8 @@ public abstract class JsonGeocoder implements Geocoder {
public abstract Address parseAddress(JsonObject json);
- protected String getError(JsonObject json) {
- return "";
+ protected String parseError(JsonObject json) {
+ return null;
}
}