public void exceptionOccurred(Exception exception) { // System.out.println("ex: "+exception); // exception.printStackTrace(); // Avoid having multiple exception occurred notifications. future.setExceptionIfUndone(exception); // if(!future.isDone()) // StoreIntermediateDelegationResultListener.super.exceptionOccurred(exception); ret.setResult(null); } });
public void exceptionOccurred(Exception exception) { // System.out.println("ex: "+exception); // exception.printStackTrace(); // Avoid having multiple exception occurred notifications. future.setExceptionIfUndone(exception); // if(!future.isDone()) // StoreIntermediateDelegationResultListener.super.exceptionOccurred(exception); ret.setResult(null); } });
/** * Called when an exception occurred. * @param exception The exception. */ public void customExceptionOccurred(Exception exception) { if(undone) { future.setExceptionIfUndone(exception); } else { future.setException(exception); } }
/** * Handle an exception. */ protected void handleException(Exception e) { if(future!=null) { // e.printStackTrace(); // Could happen that overridden customResultAvailable method // first sets result and then throws exception (listener ex are // catched). future.setExceptionIfUndone(e); } else { if(undone && delegate instanceof IUndoneResultListener) { ((IUndoneResultListener)delegate).exceptionOccurredIfUndone(e); } else { delegate.exceptionOccurred(e); } } } }
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurred(Exception exception) { if(delegate != null) { if(undone && delegate instanceof IUndoneResultListener) { ((IUndoneResultListener)delegate).exceptionOccurredIfUndone(exception); } else { delegate.exceptionOccurred(exception); } } else { if(undone) { future.setExceptionIfUndone(exception); } else { future.setException(exception); } } }