Skip to content

Qbservable.Throw(IQbservableProvider, Exception) method

Defined in

Type: Qbservable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception)
  • 2. public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception, IScheduler scheduler)
  • 3. public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception, IScheduler scheduler, TResult witness)
  • 4. public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception, TResult witness)

1. Overload

public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception)

Summary: Returns an observable sequence that terminates with an exception.

Type parameters

NameDescription
TResultThe type used for the IObservable type parameter of the resulting sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
exceptionExceptionException object used for the sequence's termination.

Returns: IQbservable -- The observable sequence that terminates exceptionally with the specified exception object.

Exceptions

TypeCondition
System.ArgumentNullExceptionexception is null.

2. Overload

public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception, IScheduler scheduler)

Summary: Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single OnError message.

Type parameters

NameDescription
TResultThe type used for the IObservable type parameter of the resulting sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
exceptionExceptionException object used for the sequence's termination.
scheduler[IScheduler](#Scheduler to send the exceptional termination call on.

Returns: IQbservable -- The observable sequence that terminates exceptionally with the specified exception object.

Exceptions

TypeCondition
System.ArgumentNullExceptionexception or scheduler is null.

3. Overload

public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception, IScheduler scheduler, TResult witness)

Summary: Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single OnError message.

Type parameters

NameDescription
TResultThe type used for the IObservable type parameter of the resulting sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
exceptionExceptionException object used for the sequence's termination.
scheduler[IScheduler](#Scheduler to send the exceptional termination call on.
witnessTResultObject solely used to infer the type of the TResult type parameter. This parameter is typically used when creating a sequence of anonymously typed elements.

Returns: IQbservable -- The observable sequence that terminates exceptionally with the specified exception object.

Exceptions

TypeCondition
System.ArgumentNullExceptionexception or scheduler is null.

4. Overload

public static IQbservable<TResult> Throw<TResult>(this IQbservableProvider provider, Exception exception, TResult witness)

Summary: Returns an observable sequence that terminates with an exception.

Type parameters

NameDescription
TResultThe type used for the IObservable type parameter of the resulting sequence.

Parameters

NameTypeDescription
provider[IQbservableProvider](#Query provider used to construct the [IQbservable](# data source.
exceptionExceptionException object used for the sequence's termination.
witnessTResultObject solely used to infer the type of the TResult type parameter. This parameter is typically used when creating a sequence of anonymously typed elements.

Returns: IQbservable -- The observable sequence that terminates exceptionally with the specified exception object.

Exceptions

TypeCondition
System.ArgumentNullExceptionexception is null.