Chain.Catch Method

Definition

Overloads

Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>)

When the antecedent IDialog<TResult> has completed, catch and handle any exceptions of type E.

Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>)

When the antecedent IDialog<TResult> has completed, catch and handle any exceptions.

Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>)

When the antecedent IDialog<TResult> has completed, catch and handle any exceptions of type E.

public static Microsoft.Bot.Builder.Dialogs.IDialog<T> Catch<T,E> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent, Func<Microsoft.Bot.Builder.Dialogs.IDialog<T>,E,Microsoft.Bot.Builder.Dialogs.IDialog<T>> block) where E : Exception;
static member Catch : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Func<Microsoft.Bot.Builder.Dialogs.IDialog<'T>, 'E, Microsoft.Bot.Builder.Dialogs.IDialog<'T> (requires 'E :> Exception)> -> Microsoft.Bot.Builder.Dialogs.IDialog<'T> (requires 'E :> Exception)
<Extension()>
Public Function Catch(Of T, E) (antecedent As IDialog(Of T), block As Func(Of IDialog(Of T), E, IDialog(Of T))) As IDialog(Of T)

Type Parameters

T

The type returned by the antecedent dialog.

E

The type of exception to catch and handle.

Parameters

antecedent
IDialog<T>

The antecedent dialog IDialog<TResult>.

block
Func<IDialog<T>,E,IDialog<T>>

The lambda expression representing the catch block handler.

Returns

IDialog<T>

The result of the catch block handler if there is an exception of type E.

Applies to

Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>)

When the antecedent IDialog<TResult> has completed, catch and handle any exceptions.

public static Microsoft.Bot.Builder.Dialogs.IDialog<T> Catch<T> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent, Func<Microsoft.Bot.Builder.Dialogs.IDialog<T>,Exception,Microsoft.Bot.Builder.Dialogs.IDialog<T>> block);
static member Catch : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Func<Microsoft.Bot.Builder.Dialogs.IDialog<'T>, Exception, Microsoft.Bot.Builder.Dialogs.IDialog<'T>> -> Microsoft.Bot.Builder.Dialogs.IDialog<'T>
<Extension()>
Public Function Catch(Of T) (antecedent As IDialog(Of T), block As Func(Of IDialog(Of T), Exception, IDialog(Of T))) As IDialog(Of T)

Type Parameters

T

The type returned by the antecedent dialog.

Parameters

antecedent
IDialog<T>

The antecedent dialog IDialog<TResult>.

block
Func<IDialog<T>,Exception,IDialog<T>>

The lambda expression representing the catch block handler.

Returns

IDialog<T>

The result of the catch block handler if there is an exception.

Applies to