Code example for ExecutionException

0
  } 
 
  private synchronized T doGet(final Long timeoutMs) throws InterruptedException, ExecutionException, TimeoutException {
 
    if (this.mException != null) {
      throw new ExecutionException(this.mException);
    } 
 
    if (this.mResultReceived) {
      return this.mResult;
    } 
 
    if (timeoutMs == null) {
      wait(0);
    } else if (timeoutMs > 0) {
      wait(timeoutMs);
    } 
 
    if (this.mException != null) {
      throw new ExecutionException(this.mException);
    }