Observable

Observable.Throw<TResult> Method (Exception)

Returns an observable sequence that terminates with an exception.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Shared Function Throw(Of TResult) ( _
    exception As Exception _
) As IObservable(Of TResult)
'Usage
Dim exception As Exception
Dim returnValue As IObservable(Of TResult)

returnValue = Observable.Throw(exception)
public static IObservable<TResult> Throw<TResult>(
    Exception exception
)
public:
generic<typename TResult>
static IObservable<TResult>^ Throw(
    Exception^ exception
)
static member Throw : 
        exception:Exception -> IObservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TResult
    The type of result.

Parameters

  • exception
    Type: System.Exception
    The exception object used for the sequence’s termination.

Return Value

Type: System.IObservable<TResult>
Observable sequence that terminates exceptionally with the specified exception object.

See Also

Reference

Observable Class

Throw Overload

System.Reactive.Linq Namespace

Observable.Throw<TResult> Method (Exception, IScheduler)

Returns an observable sequence that terminates with an exception with the specified scheduler.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Shared Function Throw(Of TResult) ( _
    exception As Exception, _
    scheduler As IScheduler _
) As IObservable(Of TResult)
'Usage
Dim exception As Exception
Dim scheduler As IScheduler
Dim returnValue As IObservable(Of TResult)

returnValue = Observable.Throw(exception, _
    scheduler)
public static IObservable<TResult> Throw<TResult>(
    Exception exception,
    IScheduler scheduler
)
public:
generic<typename TResult>
static IObservable<TResult>^ Throw(
    Exception^ exception, 
    IScheduler^ scheduler
)
static member Throw : 
        exception:Exception * 
        scheduler:IScheduler -> IObservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TResult
    The type of result.

Parameters

Return Value

Type: System.IObservable<TResult>
Observable sequence that terminates exceptionally with the specified exception object.

See Also

Reference

Observable Class

Throw Overload

System.Reactive.Linq Namespace