forError

open fun <TResult> forError(error: Exception): Task<TResult>

Creates a faulted task with the given error.