aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/database/DataManager.java8
-rw-r--r--src/org/traccar/database/IdentityManager.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index deb31094e..66d94ac91 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -124,8 +124,12 @@ public class DataManager implements IdentityManager {
}
@Override
- public Device getDeviceById(long id) throws SQLException {
- updateDeviceCache(!devicesById.containsKey(id));
+ public Device getDeviceById(long id) {
+ try {
+ updateDeviceCache(!devicesById.containsKey(id));
+ } catch (SQLException e) {
+ Log.warning(e);
+ }
return devicesById.get(id);
}
diff --git a/src/org/traccar/database/IdentityManager.java b/src/org/traccar/database/IdentityManager.java
index 761219dd5..8bdce09a3 100644
--- a/src/org/traccar/database/IdentityManager.java
+++ b/src/org/traccar/database/IdentityManager.java
@@ -19,7 +19,7 @@ import org.traccar.model.Device;
public interface IdentityManager {
- Device getDeviceById(long id) throws Exception;
+ Device getDeviceById(long id);
Device getDeviceByUniqueId(String uniqueId) throws Exception;