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

Improved Error Handling in mode.go and fs.go #3756

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saadi925
Copy link

Description:

This pull request includes improvements to error handling in mode.go and fs.go:

SetMode function in mode.go: Previously, the SetMode function would panic when an unknown mode was provided. This behavior has been modified to return an error instead of causing a panic, allowing for more graceful error handling. The corresponding tests have also been updated to reflect this change.

Open function in fs.go: The error message returned when opening a file has been enhanced to provide better context, similar to the error handling in Python.

These changes aim to improve the robustness of the code and provide clearer, more informative error messages to users.

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.

None yet

1 participant