Catch__2_1 - waf/Rx.NET GitHub Wiki

QueryableEx.Catch<TSource, TException> Method (IQueryable<TSource>, Expression<Func<TException, IEnumerable<TSource>>>)

Creates a sequence that corresponds to the source sequence, concatenating it with the sequence resulting from calling an exception handler function in case of an error.

Namespace: System.Linq
Assembly: System.Interactive.Providers (in System.Interactive.Providers.dll)

Syntax

public static IQueryable<TSource> Catch<TSource, TException>(
	this IQueryable<TSource> source,
	Expression<Func<TException, IEnumerable<TSource>>> handler
)
where TException : Exception

Parameters

source

Type: System.Linq.IQueryable<TSource>
Source sequence.

handler

Type: System.Linq.Expressions.Expression<Func<TException, IEnumerable<TSource>>>
Handler to invoke when an exception of the specified type occurs.

Type Parameters

TSource

Source sequence element type.

TException

Exception type to catch.

Return Value

Type: IQueryable<TSource>
Source sequence, concatenated with an exception handler result sequence in case of an error.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

QueryableEx Class
System.Linq Namespace

⚠️ **GitHub.com Fallback** ⚠️