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

additional error handling when checking for file existence #946

Merged
merged 7 commits into from
Oct 29, 2021

Conversation

veggiesaurus
Copy link
Collaborator

@veggiesaurus veggiesaurus commented Oct 20, 2021

Closes #945 by adding additional error handling when calling fs::exists

… situations where parent directories can't be read
@veggiesaurus veggiesaurus marked this pull request as draft October 20, 2021 19:15
@veggiesaurus veggiesaurus marked this pull request as ready for review October 27, 2021 08:56
src/Util/App.cc Outdated Show resolved Hide resolved
src/Table/Table.cc Outdated Show resolved Hide resolved
src/SessionManager/ProgramSettings.cc Show resolved Hide resolved
Copy link
Contributor

@jolopezl jolopezl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few comments. A couple of minor comments, and another more general across the changes regarding the use of fs::exists. Is the purpose of using fs::exists(p, ec) just using the overload of fs::exists that doesn't throw an exception?

src/Frame.cc Outdated Show resolved Hide resolved
src/SessionManager/ProgramSettings.cc Show resolved Hide resolved
src/SimpleFrontendServer/SimpleFrontendServer.cc Outdated Show resolved Hide resolved
src/SimpleFrontendServer/SimpleFrontendServer.cc Outdated Show resolved Hide resolved
src/SimpleFrontendServer/SimpleFrontendServer.cc Outdated Show resolved Hide resolved
@confluence
Copy link
Collaborator

I agree that we should be consistent about either using the functions that throw or the functions that do not.

@veggiesaurus
Copy link
Collaborator Author

I agree that we should be consistent about either using the functions that throw or the functions that do not.

I have changed them all, except for one: SimpleFrontendServer::ClearObjectFromString has calls in a try-catch and we actually want to get hold of the exception information in this case, so I've left it is.

Copy link
Contributor

@jolopezl jolopezl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments!. Looks great.

@veggiesaurus veggiesaurus merged commit ae68795 into dev Oct 29, 2021
@veggiesaurus veggiesaurus deleted the angus/fs_error_check branch October 29, 2021 13:38
veggiesaurus added a commit that referenced this pull request Nov 25, 2021
@veggiesaurus veggiesaurus mentioned this pull request Nov 25, 2021
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.

Backend crashes on RedHat platforms when certain folders aren't accesible
4 participants