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

Custom editors do not have good error handling when saving fails #115414

Closed
Tyriar opened this issue Jan 29, 2021 · 5 comments
Closed

Custom editors do not have good error handling when saving fails #115414

Tyriar opened this issue Jan 29, 2021 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug custom-editors Custom editor API (webview based editors) verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 29, 2021

Context: #115028 (comment)

Repro:

  1. Throw in your custom editor extension's saveCustomDocument implementation
  2. Debug
  3. Open custom editor
  4. Make a change, exception occurs on auto save
  5. Try close, error notification shows
  6. Stop debugging, waiting for dirty editors to save notification shows

recording

Related issue I just created for dirty custom editors with auto save: #115404

@bpasero bpasero added the custom-editors Custom editor API (webview based editors) label Jan 29, 2021
@bpasero bpasero added this to the February 2021 milestone Jan 29, 2021
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Jan 29, 2021
@bpasero bpasero changed the title Throwing in CustomEditorProvider.saveCustomDocument with auto save allows closing tab and VS Code cannot be closed Custom editors do not have good error handling when saving fails Jan 29, 2021
@bpasero
Copy link
Member

bpasero commented Jan 29, 2021

Looks like we still have some specific code for handling save errors that is not generic enough to handle the custom editor, e.g.:

  • you don't see any notification when save fails
  • the editor does not indicate dirty

image

@bpasero
Copy link
Member

bpasero commented Feb 1, 2021

@Tyriar I pushed some commits today that should improve this, can you maybe retry your scenario? Mainly:

@Tyriar
Copy link
Member Author

Tyriar commented Feb 1, 2021

@bpasero thanks, made a note to try it out in tomorrow's insiders

@bpasero
Copy link
Member

bpasero commented Feb 2, 2021

Closing as per #115028 (comment) where you can see how this behaves now. The underlying reason why the notification appears and never ends is actually #115588

@bpasero bpasero closed this as completed Feb 2, 2021
@Tyriar
Copy link
Member Author

Tyriar commented Feb 2, 2021

@bpasero much better 👍

@Tyriar Tyriar added the verified Verification succeeded label Feb 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug custom-editors Custom editor API (webview based editors) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants