Skip to content

Emit better error messages for all dialogs #4153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 3, 2020
Merged

Conversation

tomlm
Copy link
Contributor

@tomlm tomlm commented Jun 23, 2020

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"
           ],
       }
}

@tomlm tomlm changed the title Add DialogException which capture dialog context information in dialogs Emit better error messages for all dialogs Jun 23, 2020
@tomlm tomlm requested review from carlosscastro and Stevenic June 23, 2020 03:38
@Stevenic
Copy link
Contributor

Stevenic commented Jun 23, 2020

@johnataylor should weigh in as we just had a discussion today about not creating custom exception classes. #Resolved

@tomlm
Copy link
Contributor Author

tomlm commented Jun 23, 2020

I agree, wrapping is not a good approach, I have switched to using Exception.Data to add metadata about context of exception.


In reply to: 647899206 [](ancestors = 647899206)

@cleemullins
Copy link
Contributor

@tomlm CAn you resolve the merge conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emit better error messages for all adaptive actions
4 participants