Example usage for com.google.gwt.user.client IncrementalCommandCanceledException IncrementalCommandCanceledException

List of usage examples for com.google.gwt.user.client IncrementalCommandCanceledException IncrementalCommandCanceledException

Introduction

In this page you can find the example usage for com.google.gwt.user.client IncrementalCommandCanceledException IncrementalCommandCanceledException.

Prototype

public IncrementalCommandCanceledException(IncrementalCommand command) 

Source Link

Usage

From source file:gov.lbl.glamm.client.experiment.util.DelayConfigCommandExecutor.java

License:Apache License

/**
 * Reports either a {@link CommandCanceledException} or an
 * {@link IncrementalCommandCanceledException} back through the
 * {@link UncaughtExceptionHandler} if one is set.
 *//* www.j ava 2 s.  co m*/
protected void doCommandCanceled() {
    Object cmd = iterator.getLast();
    iterator.remove();
    assert (cmd != null);

    RuntimeException ex = null;
    if (cmd instanceof Command) {
        ex = new CommandCanceledException((Command) cmd);
    } else if (cmd instanceof IncrementalCommand) {
        ex = new IncrementalCommandCanceledException((IncrementalCommand) cmd);
    }

    if (ex != null) {
        UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
        if (ueh != null) {
            ueh.onUncaughtException(ex);
        }
    }

    setExecuting(false);

    maybeStartExecutionTimer();
}