]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplSocket.java
Remove usage of deprecated SimanticsUI-methods
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / SessionImplSocket.java
index a08011fed1172615a2f937cb9de08bc099f3f1de..62b7e382522e78cf726c589507824ec7df95242d 100644 (file)
@@ -3179,9 +3179,11 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
         });
 
         Throwable t = exception.get();
-        if(t != null) {
-            if(t instanceof DatabaseException) throw (DatabaseException)t;
-            else throw new DatabaseException("Unexpected exception in ReadGraph.syncRequest(Read)", t);
+        if (t != null) {
+            if (t instanceof DatabaseException)
+                throw (DatabaseException) t;
+            else
+                throw new DatabaseException("Unexpected exception in ReadGraph.syncRequest(Read)", t);
         }
 
         return result;
@@ -3387,28 +3389,6 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
         asyncRequest(request, (Procedure<T>)procedure);
     }
 
-
-
-    void check(Throwable t) throws DatabaseException {
-        if(t != null) {
-            if(t instanceof DatabaseException) throw (DatabaseException)t;
-            else throw new DatabaseException("Unexpected exception", t);
-        }
-    }
-
-    void check(DataContainer<Throwable> container) throws DatabaseException {
-        Throwable t = container.get();
-        if(t != null) {
-            if(t instanceof DatabaseException) throw (DatabaseException)t;
-            else throw new DatabaseException("Unexpected exception", t);
-        }
-    }
-
-
-
-
-
-
     boolean sameProvider(Write request) {
         if(writeState.getGraph().provider != null) {
             return writeState.getGraph().provider.equals(request.getProvider());
@@ -3425,9 +3405,11 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
 
 
     public static final ThreadGroup SessionThreadGroup = new ThreadGroup("Session Thread Group");
+
     private void assertNotSession() throws DatabaseException {
         Thread current = Thread.currentThread();
-        if(sessionThreads.contains(current)) throw new DatabaseException("Caller is already inside a transaction.");
+        if (sessionThreads.contains(current))
+            throw new ServiceException("Caller is already inside a transaction.");
     }
 
     void assertAlive() {