-
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
Introduce non-throwing variants of hasToken #45341
Introduce non-throwing variants of hasToken #45341
Conversation
4222aa7
to
0cbc7f9
Compare
c4221b3
to
357d724
Compare
@kssenii I've fixed any issues I could find based on the checks. Could you please help me with the failing ones if there are any further I should aim to resolve? |
Please take a look at failed
Also
You can also find server logs there. |
0437704
to
0fc68e5
Compare
0fc68e5
to
810c9ba
Compare
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.
Sorry, I saw that @kssenii was assigned already. Just took a look because I did some work in this area/file already.
06ed25e
to
9710b86
Compare
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.
Restarted some tests, they failed due to unrelated infra issues.
Integration tests failures not related - they are broken in master |
if (i < res.size()) | ||
memset(&res[i], negate, (res.size() - i) * sizeof(res[0])); | ||
} | ||
catch (...) |
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.
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.
If this is the only problem with the code, then I have a correction: #51425
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.
@alexey-milovidov the range you highlighted is mostly unchanged. Or is it the try-catch as @rschu1ze is suggesting? If you could provide some way of reproducing potential issues with it I'd be happy to contribute an improvement.
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.
Yes, catch (...)
is the problem.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Introduce non-throwing variants of hasToken and hasTokenCaseInsensitive
Documentation entry for user-facing changes
Since the
hasToken
function isn't explicitly documented in the first place, I'll provide some explanation below:needle
parameter by returningnull
instead of throwing an exception.haystack
as first argument andneedle
as second, matching that ofhasToken
.