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

PLAT-653: ensure "try" methods of fs utilities do not throw during commo... #127

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

Conversation

wsourdeau
Copy link
Contributor

...n failures

// it doesn't exist
FsObjectInfo tryGetUriObjectInfo(const std::string & filename);
// it doesn't exist (deprecated, use getUriObjectInfo instead)
FsObjectInfo tryGetUriObjectInfo(const std::string & filename) __attribute__((__deprecated__));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this deprecated? I use it all over the place. It will stop lots of code from compiling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought this would only generate a warning. The deprecation, because both methods are now using the same code, and my intention was for it to serve only as an indicator for new code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeremybarnes does getUriObjectInfo need to throw if the object is not found? Is it considered part of the semantics?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, it is an important part of the semantics. It allows you to chain calls without regard for checking the return code for each one.

@wsourdeau
Copy link
Contributor Author

@jeremybarnes updated with latest code from master, can you rereview?

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.

2 participants