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

Use Files.delete() for better error reporting #4775

Closed
wants to merge 2 commits into from

Conversation

elimelec
Copy link
Contributor

Motivation:

File.delete provides only a simple boolean result. In case of failure, there's no information available. Files.delete will throw an exception with more details.

Example: Writer configured with shouldDeleteIfEmpty set to true fails to delete the empty file. No information is provided other than a simple message: "Failed to delete empty file on close".

Signed-off-by: Elimelec Burghelea <elimelec1@protonmail.com>
Signed-off-by: Elimelec Burghelea <elimelec1@protonmail.com>
@fmbenhassine
Copy link
Contributor

This is a great enhancement 👍 Rebased, squashed and merged as 4671b62. Thank you for your contribution !

@elimelec elimelec deleted the delete-fail-reason branch March 18, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants