Skip to content

TaskObservableMethodBuilder.SetException(Exception) method

Defined in

Type: TaskObservableMethodBuilder Namespace: System.Runtime.CompilerServices Assembly: System.Reactive.dll

Applies to

netstandard2.0

public void SetException(Exception exception)

Summary: Marks the observable as failed and binds the specified exception to the observable sequence.

Parameters

NameTypeDescription
exceptionExceptionThe exception to bind to the observable sequence.

Exceptions

TypeCondition
System.ArgumentNullExceptionexception is null.
System.InvalidOperationExceptionThe observable has already completed.