1 package org.simantics.ui.workbench.handler;
3 import org.eclipse.core.commands.AbstractHandler;
4 import org.eclipse.core.commands.ExecutionEvent;
5 import org.eclipse.core.commands.ExecutionException;
6 import org.simantics.db.exception.DatabaseException;
8 abstract public class AbstractDatabaseHandler extends AbstractHandler {
10 abstract public Object checkedExecute(ExecutionEvent event) throws ExecutionException, DatabaseException;
13 final public Object execute(ExecutionEvent event) throws ExecutionException {
15 return checkedExecute(event);
16 } catch (DatabaseException e) {
17 throw new ExecutionException("The handler caught an unhandled exception, ", e);