Skip to content

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

}
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