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

example for file_size() usage #20

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

Conversation

vlenhart
Copy link

this should fix issue #17

path_demo.cpp Outdated
{
cout << "nonexistant:file_size = " << path("nonexistant").file_size() << endl;
}
catch(std::runtime_error e)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should just be catch(std::exception &e)

path_demo.cpp Outdated
{
cout << "filesystem/path.h:file_size = " << path("filesystem/path.h").file_size() << endl;
}
catch(std::runtime_error e)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here catch(std::exception &e).

path_demo.cpp Outdated
{
cout << "../filesystem:file_size = " << path("../filesystem").file_size() << endl;
}
catch(std::runtime_error e)
Copy link
Contributor

Choose a reason for hiding this comment

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

And here :)

Copy link
Author

Choose a reason for hiding this comment

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

fixed

path_demo.cpp Outdated
}
catch(std::runtime_error e)
{
cout << "<file does not exist>" << endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should include "../filesystem:file_size = ".

Copy link
Author

Choose a reason for hiding this comment

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

this part of the try block actually gets executed
output looks like you would expect:

nonexistant:file_size = <file does not exist>

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