-
Notifications
You must be signed in to change notification settings - Fork 272
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
Add more details to FileManager error report #1895
Open
MrStevns
wants to merge
24
commits into
pencil2d:master
Choose a base branch
from
MrStevns:improvement/saving-error-handling
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add more details to FileManager error report #1895
MrStevns
wants to merge
24
commits into
pencil2d:master
from
MrStevns:improvement/saving-error-handling
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The problem with not aborting here is that while one file can fail, it will be noted down but if the next file succeeds, then it will seem like the project got compressed successfully.
And get rid of useless or confusing information.
The logic didn't account for existing files with "backup" suffix, eg. A folder may contain: MyProject.pclx MyProject.backup1.pclx If the user opened MyProject.pclx, and failed to save it later, the logic would not count existing backup files like: "MyProject.backup1.pclx" and as such the result would be no backup being made.
…non existent files This is caused by the new logic actually catching when a file has gone missing while saving. While it may not fix any bugs inheritly, it should make it easier to diagnose problems in the future.
I'm blown away by the fact that this worked at all... wtf. The only one who reported a problem here was windows but technically the file should never have been closed on any of them. Frightening..
And move some closer to the open call to make sure it happens when the scope ends.
MrStevns
force-pushed
the
improvement/saving-error-handling
branch
from
November 24, 2024 13:11
bb18358
to
d4bdc23
Compare
MrStevns
changed the title
Improve FileManager error handling for readability
Add more details to FileManager error report
Nov 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of this PR has been to make the error report cover more steps, introduce "Error" to make it more explicit what's a information, a warning and an error.
I've also tried to make it fail faster rather than spitting out all kinds of irrelevant information when the actual error happened 4 lines above.
Here's an example of what our current report looks like:
And here's the new one:
In addition the error dialog now also has a "Copy to clipboard" button, so the user can more easily paste the error report.