aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/location/OpenCellIdLocationProvider.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-31 11:13:49 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-31 11:13:49 +1300
commit2c6c6eccf2c45bf87e16c45e3bac9872f53c12c3 (patch)
tree480d52fafcd7331244e69b46dbd3283f36fef4b4 /src/org/traccar/location/OpenCellIdLocationProvider.java
parentde60cf9d75d669a8078df32f7e11bf7af1970777 (diff)
downloadtrackermap-server-2c6c6eccf2c45bf87e16c45e3bac9872f53c12c3.tar.gz
trackermap-server-2c6c6eccf2c45bf87e16c45e3bac9872f53c12c3.tar.bz2
trackermap-server-2c6c6eccf2c45bf87e16c45e3bac9872f53c12c3.zip
Implement geolocation error handling
Diffstat (limited to 'src/org/traccar/location/OpenCellIdLocationProvider.java')
-rw-r--r--src/org/traccar/location/OpenCellIdLocationProvider.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/location/OpenCellIdLocationProvider.java b/src/org/traccar/location/OpenCellIdLocationProvider.java
index b45797b80..a9f815399 100644
--- a/src/org/traccar/location/OpenCellIdLocationProvider.java
+++ b/src/org/traccar/location/OpenCellIdLocationProvider.java
@@ -55,7 +55,7 @@ public class OpenCellIdLocationProvider implements LocationProvider {
json.getJsonNumber("lat").doubleValue(),
json.getJsonNumber("lon").doubleValue(), 0);
} else {
- callback.onFailure();
+ callback.onFailure(new IllegalArgumentException("Coordinates are missing"));
}
}
return null;
@@ -63,12 +63,12 @@ public class OpenCellIdLocationProvider implements LocationProvider {
@Override
public void onThrowable(Throwable t) {
- callback.onFailure();
+ callback.onFailure(t);
}
});
} else {
- callback.onFailure();
+ callback.onFailure(new IllegalArgumentException("No network information"));
}
}