Closed
Description
Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#4153
Fixes #3980
Description
Change dialogContext to capture exceptions and annotate exception with contextual information about where the exception happened.
Specific Changes
- Add try/catch handlers to dialogContext methods to set Exception.Data["dialogContext'] with metadata about the context that the exception was thrown.
Testing
- Updated existing OnError testing to test and validate for the dialog context data
Example exception metadata
{
...,
"data":
{
"DialogContext":
{
"ActiveDialog": "SetProperty[=`foo`]",
"Parent": "innerDialog",
"Stack": [
"SetProperty[=`foo`]",
"innerDialog",
"planningTest"
],
}
}
Changed projects
- Microsoft.Bot.Builder.Dialogs
- Microsoft.Bot.Builder.Dialogs.Tests