aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-12 16:56:42 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-12 16:56:42 +1300
commitde9487c9c3e1b088bb2774751f8b0d0e3a5c7fce (patch)
tree8fd144779f3584850b1bf70c09179c6f6a2e1b9d /src/org
parent1f5489c0188dd3e063b9e226891f0fce662ee4b4 (diff)
downloadtrackermap-web-de9487c9c3e1b088bb2774751f8b0d0e3a5c7fce.tar.gz
trackermap-web-de9487c9c3e1b088bb2774751f8b0d0e3a5c7fce.tar.bz2
trackermap-web-de9487c9c3e1b088bb2774751f8b0d0e3a5c7fce.zip
Change Java version to 1.6
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/web/server/model/DataServiceImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java
index a1ea80be..57357aa8 100644
--- a/src/org/traccar/web/server/model/DataServiceImpl.java
+++ b/src/org/traccar/web/server/model/DataServiceImpl.java
@@ -116,7 +116,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
try {
entityManager.persist(user);
entityManager.getTransaction().commit();
- } catch (Exception e) {
+ } catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
@@ -140,7 +140,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
entityManager.persist(device);
user.getDevices().add(device);
entityManager.getTransaction().commit();
- } catch (Exception e) {
+ } catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
@@ -153,7 +153,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
try {
device = entityManager.merge(device);
entityManager.getTransaction().commit();
- } catch (Exception e) {
+ } catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
@@ -170,9 +170,9 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
// If you want to remove device you need to remove all linked positions
//entityManager.remove(device);
entityManager.getTransaction().commit();
- } catch (Exception e) {
+ } catch (RuntimeException e) {
entityManager.getTransaction().rollback();
- throw e;
+
}
return device;
}