-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[vcpkg] Improve vcpkg::Files::Filesystem error handling #6919
Merged
ras0219-msft
merged 9 commits into
microsoft:master
from
ras0219-msft:dev/roschuma/error-handling
Jun 19, 2019
Merged
[vcpkg] Improve vcpkg::Files::Filesystem error handling #6919
ras0219-msft
merged 9 commits into
microsoft:master
from
ras0219-msft:dev/roschuma/error-handling
Jun 19, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Always require either std::error_code or LineInfo to print better errors.
ras0219-msft
added
the
info:internal
This PR or Issue was filed by the vcpkg team.
label
Jun 16, 2019
Drive by fix: silence warnings in tests.
@@ -51,8 +51,9 @@ namespace vcpkg::Files | |||
bool Filesystem::remove(const fs::path& path, LineInfo linfo) | |||
{ | |||
std::error_code ec; | |||
this->remove(path, ec); | |||
auto r = this->remove(path, ec); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful to add C4716 / -Werror=return-type
to prevent this type of UB in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! :)
Drive by fixes for /analyze with VS2019
thank you so much )) |
strega-nil
pushed a commit
to strega-nil/vcpkg
that referenced
this pull request
May 5, 2021
* [vcpkg] Modify Filesystem::remove and Filesystem::rename to not throw. * [.gitignore] Ignore new VS2019 CMake integration default location * [.gitignore] Ignore CMakeSettings.json in toolsrc * [vcpkg] Time external processes called with System::cmd_execute * [vcpkg] Work around VS2019 CMake bug * [vcpkg] Fix several unused variable warnings. * [vcpkg] Improve error handling in vcpkg::Files::Filesystem Always require either std::error_code or LineInfo to print better errors. * [vcpkg] Fixup missing return value. Drive by fix: silence warnings in tests. * [vcpkg] Fix exiting in error_code overload Drive by fixes for /analyze with VS2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.