Chain.Catch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
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>>)
- Source:
- Chain.cs
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>.
Returns
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>>)
- Source:
- Chain.cs
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>.
The lambda expression representing the catch block handler.
Returns
The result of the catch block handler if there is an exception.