-
Notifications
You must be signed in to change notification settings - Fork 171
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
More detailed error message for SystemError exceptions #6756
Conversation
It looks like the expected error for the "Disabled user results in a sync error" test (test/object-store/sync/app.cpp:2874) needs to be updated as well. |
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.
LGTM, provided CI does not complain :-)
{ | ||
std::error_code err = std::make_error_code(std::errc::too_many_files_open); | ||
std::string_view message = "my message"; | ||
std::string expected = util::format("%1 (SystemError %2: %3)", message, err.value(), "Too many open files"); |
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.
CHECK_STRING_CONTAINS(e.what(), expected) failed with (my message (SystemError 24: too many files open), my message (SystemError 24: Too many open files))
... Only on Windows though.
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. Windows seems to provide a slightly different error message, so I've adjusted the tests accordingly.
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.
Of course Windows just has to be different
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.
Looks good now that all the tests are passing.
{ | ||
std::error_code err = std::make_error_code(std::errc::too_many_files_open); | ||
std::string_view message = "my message"; | ||
std::string expected = util::format("%1 (SystemError %2: %3)", message, err.value(), "Too many open files"); |
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.
Of course Windows just has to be different
* a more detailed error message for SystemError exceptions * update error message * fix windows message
Issues like #6739 would be much easier to diagnose if the reported exception message had the details about what the error code was. The std error code was already stored there, so this change just appends the details to the existing message.
☑️ ToDos