X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FSessionImplSocket.java;h=22d0f316545762d4937b384bea9fd648e8bdd441;hp=030d512eb736e2f6303f0d68c1d0b0e3d2e57b97;hb=472f4b2af82d02fb46f9a929fb6c8090bb4c5301;hpb=a88c02c2d0f4250caf887a130b9f4314c6564722 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplSocket.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplSocket.java index 030d512eb..22d0f3165 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplSocket.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplSocket.java @@ -1632,37 +1632,31 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule if (listener != null) { try { - QueryCacheBase.resultAsyncReadEntry(newGraph, request, null, listener, procedure); - } catch (DatabaseException e) { - Logger.defaultLogError(e); - } + QueryCacheBase.resultAsyncReadEntry(newGraph, request, null, listener, procedure); + } catch (DatabaseException e) { + LOGGER.error("Unhandled query exception", e); + } } else { - BlockingAsyncProcedure wrap = new BlockingAsyncProcedure(newGraph, null, procedure, request, true) { - - public void execute(AsyncReadGraph graph_, T result) { - task.finish(); - super.execute(graph_, result); - } - - public void exception(AsyncReadGraph graph_, Throwable t) { - task.finish(); - super.exception(graph_, t); - } - - }; - - try { + BlockingAsyncProcedure wrap = new BlockingAsyncProcedure(newGraph, null, procedure, request, true) { - request.perform(newGraph, wrap); - wrap.dec(); - wrap.get(); + public void execute(AsyncReadGraph graph_, T result) { + task.finish(); + super.execute(graph_, result); + } - } catch (DatabaseException e) { + public void exception(AsyncReadGraph graph_, Throwable t) { + task.finish(); + super.exception(graph_, t); + } - Logger.defaultLogError(e); + }; + try { + wrap.performSync(request); + } catch (DatabaseException e) { + LOGGER.error("Unhandled query exception", e); } }