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

[vcpkg] Improve vcpkg::Files::Filesystem error handling #6919

Merged

Conversation

ras0219-msft
Copy link
Contributor

No description provided.

@ras0219-msft ras0219-msft added the info:internal This PR or Issue was filed by the vcpkg team. label Jun 16, 2019
@ras0219-msft ras0219-msft self-assigned this 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);
Copy link
Contributor

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.

Copy link
Contributor Author

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
@ras0219-msft ras0219-msft merged commit e5b92a3 into microsoft:master Jun 19, 2019
@MVoz
Copy link
Contributor

MVoz commented Jun 20, 2019

thank you so much ))
"DB" can now be edited

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
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants