- } else {
- try {
- proc.execute(graph, (T) getResult());
- } catch (Throwable t) {
- LOGGER.error("performFromCache proc.execute failed", t);
+ Throwable t = (Throwable) getResult();
+ if(t instanceof DatabaseException) {
+ throw (DatabaseException)t;
+ } else {
+ throw new DatabaseException(t);