Skip to content
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

Catch stream exceptions for some Debug Adapter stability. #1022

Merged

Conversation

TylerLeonhardt
Copy link
Member

This helps protect from a crash we were seeing with the "Start without debugging" feature in VS Code.

@TylerLeonhardt TylerLeonhardt changed the title Catch stream exceptions for some Debug Adapter stability Catch stream exceptions for some Debug Adapter stability. Sep 6, 2019
Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One question

e is IOException)
{
// We catch this exception for when the DebugAdapter disconnects while still processing a message.
logger.WriteException("Tried to write to the output stream but it was already closed & broken.", e);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably happens decently often, do we want to make this a verbose message? If you can't include an exception in the verbose message then never mind.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbose doesn't allow an exception but I did change this to WriteHandledException!

@PowerShell PowerShell deleted a comment Sep 10, 2019
@TylerLeonhardt TylerLeonhardt merged commit 95cb12e into PowerShell:master Sep 16, 2019
@TylerLeonhardt TylerLeonhardt deleted the catch-stream-exceptions branch September 16, 2019 16:07
TylerLeonhardt added a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Sep 16, 2019
…#1022)

* catch stream exceptions for Debug Adapter

* Use WriteHandledException
TylerLeonhardt added a commit that referenced this pull request Sep 17, 2019
…1022) (#1026)

* catch stream exceptions for Debug Adapter

* Use WriteHandledException
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.

3 participants