code: public static <TResult> Task<TResult> forError(Exception error) {
      bolts.TaskCompletionSource<TResult> tcs = new bolts.TaskCompletionSource<>();
      tcs.setError(error);
      return tcs.getTask();
    }
docs: Creates a faulted task with the given error.