Code example for ExecutionException

0
    } 
    public synchronized void setException(Throwable throwable) {
        if (ready) {
            return; 
        } 
        this.exception = new ExecutionException(throwable);
        this.ready = true;
        notifyAll();
    } 
    public synchronized String getContent() throws ExecutionException {
        while (!ready) {
            try { 
                wait();
            } catch (InterruptedException e) {
            } 
        } 
        if (exception != null) {
            throw exception;
        } 
        return realdata.getContent();
    }