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
Handle errors accessing the amend state file #9037
Conversation
04e20d1
to
28d6627
Compare
} | ||
catch (Exception ex) | ||
{ | ||
MessageBox.Show(null, string.Format(CannotAccessFile, ex.Message, filePath), errorTitle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let it bubble up to the global handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I agree to what you wrote "in this specific scenario we need to ignore the exception".
Just let the user know that something went wrong but I see no need to cancel the other operations in FormCommit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(If these file accesses would fail often, a retry should be offered here.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave a comment here explaining why we're swallowing the exception and not sending to the global handler.
a31fc41
to
b91e404
Compare
@msftbot merge in 1 day |
Hello @mstv! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
b91e404
to
fcf7c93
Compare
the same way as for the commit message
fcf7c93
to
4de9d99
Compare
Fixes #9036
Proposed changes
Screenshots
N/A
Test methodology
Test environment(s)
✒️ I contribute this code under The Developer Certificate of Origin.