X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2Fhandler%2FAbstractDatabaseHandler.java;fp=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2Fhandler%2FAbstractDatabaseHandler.java;h=59d10121b92d5ef357779647ecfb76b231ae3767;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=b1a30988cf4f331336f89b15a8739c8b3d40388a;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/handler/AbstractDatabaseHandler.java b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/handler/AbstractDatabaseHandler.java index b1a30988c..59d10121b 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/handler/AbstractDatabaseHandler.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/handler/AbstractDatabaseHandler.java @@ -1,21 +1,21 @@ -package org.simantics.ui.workbench.handler; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.simantics.db.exception.DatabaseException; - -abstract public class AbstractDatabaseHandler extends AbstractHandler { - - abstract public Object checkedExecute(ExecutionEvent event) throws ExecutionException, DatabaseException; - - @Override - final public Object execute(ExecutionEvent event) throws ExecutionException { - try { - return checkedExecute(event); - } catch (DatabaseException e) { - throw new ExecutionException("The handler caught an unhandled exception, ", e); - } - } - -} +package org.simantics.ui.workbench.handler; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.simantics.db.exception.DatabaseException; + +abstract public class AbstractDatabaseHandler extends AbstractHandler { + + abstract public Object checkedExecute(ExecutionEvent event) throws ExecutionException, DatabaseException; + + @Override + final public Object execute(ExecutionEvent event) throws ExecutionException { + try { + return checkedExecute(event); + } catch (DatabaseException e) { + throw new ExecutionException("The handler caught an unhandled exception, ", e); + } + } + +}