Configures the retryer to retry if an exception of the given class (or subclass of the given class) is
thrown by the call.

@param exceptionClass the type of the exception which should cause the retryer to retry
@return <code>this</code>
342124
public RetryerBuilder<V> retryIfExceptionOfType(@Nonnull Class<? extends Throwable> exceptionClass) {
        Preconditions.checkNotNull(exceptionClass, "exceptionClass may not be null");
        rejectionPredicate = Predicates.or(rejectionPredicate, new ExceptionClassPredicate<V>(exceptionClass));
        return this;
    }
953652
public Exception cancel(Exception error) {
		cancelled = true;
		if (error != null) {
			this.error = error;
		}
		return error;
	}
328520
public static ExceptionCallback ignore() {
        return new ExceptionCallback() {
            @Override
            public void exception(FailedEventInvocation invocation) {
                FailedEventInvocation.log(LOG, invocation);
            }
        };
    }
249032
public static <T extends Exception> void exception(Class<T> exceptionClass, ExceptionHandler<? super T> handler) {
        getInstance().exception(exceptionClass, handler);
    }
362241
public static ExceptionCallback failOnError() {
        return new ExceptionCallback() {
            @Override
            public void exception(FailedEventInvocation invocation) {
                throw new AbortionException(invocation.getException());
            }
        };
    }
1192543
public RetryerBuilder<V> retryIfRuntimeException() {
        rejectionPredicate = Predicates.or(rejectionPredicate, new ExceptionClassPredicate<V>(RuntimeException.class));
        return this;
    }
1286615
@Override
    public boolean canRetry(Throwable exception) {
        if (exception == null) {
            return false;
        }

        Class<? extends Throwable> exceptionClass = exception.getClass();
        if (hasIncludes && !includes.contains(exceptionClass)) {
            return false;
        } else if (hasExcludes && excludes.contains(exceptionClass)) {
            return false;
        } else {
            return this.attemptNumber.incrementAndGet() < (maxAttempts + 1) && ((maxDelay == null) || overallDelay.get() < maxDelay.toMillis());
        }
    }
1007263
def set_exception(self, exception):
        """"""
        self._exception = exception
        self._result_set = True
        self._invoke_callbacks(self)
363140
public <V> FailureListener<V> retype (Class<V> klass)
    {
        @SuppressWarnings("unchecked") FailureListener<V> casted = (FailureListener<V>)this;
        return casted;
    }
1011467
Throwable getExpectedCause(Class expectedExceptionClass, 
			       Throwable exception) {
	Throwable result = exception.getCause();
	if (null != result) {
	    if (!expectedExceptionClass.isAssignableFrom(result.getClass())) {
		result = getExpectedCause(expectedExceptionClass, result);
	    }
	}
	return result;
    }
1147061
@Override
  public FutureResultImpl<T> setFailure(Throwable throwable) {
    this.throwable = throwable;
    failed = true;
    checkCallHandler();
    return this;
  }
81350
public void setOriginalException(Throwable originalException) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setOriginalException");
        _originalException = originalException;
        if (tc.isEntryEnabled())
            Tr.exit(tc, "setOriginalException");
    }
94891
def mark_error_retryable(error):
    
    if isinstance(error, Exception):
        alsoProvides(error, IRetryableError)
    elif inspect.isclass(error) and issubclass(error, Exception):
        classImplements(error, IRetryableError)
    else:
        raise ValueError(
            'only exception objects or types may be marked retryable')
713653
public ClassDoc exception() {
        ClassDocImpl exceptionClass;
        if (!(holder instanceof ExecutableMemberDoc)) {
            exceptionClass = null;
        } else {
            ExecutableMemberDocImpl emd = (ExecutableMemberDocImpl)holder;
            ClassDocImpl con = (ClassDocImpl)emd.containingClass();
            exceptionClass = (ClassDocImpl)con.findClass(exceptionName);
        }
        return exceptionClass;
    }
1248243
@SuppressWarnings("unchecked")
	@Override
	public T retry(final int count, final int waitTime) {
		context().setMaxRetryCount(count).setRetryWaitTime(waitTime);
		return (T) this;
	}
638427
public ServiceException setException(Throwable innerException) {
        ByteArrayOutputStream messageOutputStream = new ByteArrayOutputStream();
        innerException.printStackTrace(new PrintStream(messageOutputStream));

        String exceptionMessage = messageOutputStream.toString();

        this.fault.setException(exceptionMessage);

        return this;
    }
630418
public static void rethrowException(Throwable t) throws Exception {
		if (t instanceof Error) {
			throw (Error) t;
		}
		else if (t instanceof Exception) {
			throw (Exception) t;
		}
		else {
			throw new Exception(t.getMessage(), t);
		}
	}