header: getting rid of exception-throwing behaviors in header files [the rest]#12611
Merged
yanavlasov merged 19 commits intoenvoyproxy:masterfrom Aug 14, 2020
Merged
header: getting rid of exception-throwing behaviors in header files [the rest]#12611yanavlasov merged 19 commits intoenvoyproxy:masterfrom
yanavlasov merged 19 commits intoenvoyproxy:masterfrom
Conversation
added 15 commits
August 5, 2020 18:56
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
…_format script Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
yanavlasov
requested changes
Aug 12, 2020
source/common/protobuf/utility.h
Outdated
| if (std::isnan(msg.field_name().value())) { \ | ||
| ExceptionUtil::throwEnvoyException(fmt::format("Value not in the range of 0..100 range.")); \ | ||
| } \ | ||
| if (msg.has_##field_name()) { \ |
Contributor
There was a problem hiding this comment.
I think this can be ternary
| ExceptionUtil::throwEnvoyException( | ||
| fmt::format("filter {} does not support protocol options", name_)); | ||
| // to satisfy compiler and should never reach here. | ||
| return nullptr; |
Contributor
There was a problem hiding this comment.
I think you can annotate the throwEnvoyException() with the ABSL_ATTRIBUTE_NORETURN attribute to prevent compiler from complaining about missing return statements.
Contributor
Author
There was a problem hiding this comment.
yes, I actually did but forgot to remove the artifact here.
source/common/protobuf/utility.h
Outdated
| if (std::isnan(msg.field_name().value())) { \ | ||
| ExceptionUtil::throwEnvoyException(fmt::format("Value not in the range of 0..100 range.")); \ | ||
| } \ | ||
| if (msg.has_##field_name()) { \ |
added 2 commits
August 12, 2020 17:52
Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
lizan
reviewed
Aug 13, 2020
added 2 commits
August 13, 2020 14:21
Signed-off-by: Yifan Yang <needyyang@google.com>
Contributor
Author
|
@yanavlasov @lizan do you mind taking a look and rerun the failed test as I think that is just a flaky one |
yanavlasov
approved these changes
Aug 14, 2020
mpuncel
added a commit
to mpuncel/envoy
that referenced
this pull request
Aug 14, 2020
* master: (67 commits) logger: support log control in admin interface and command line option for Fancy Logger (envoyproxy#12369) test: fix http_timeout_integration_test flake (envoyproxy#12654) [fuzz]added an input check in writefilter fuzzer and added test cases (envoyproxy#12628) add 'explicit' restriction. (envoyproxy#12643) scoped_rds_integration_test migrate from api v2 to api v3. (envoyproxy#12633) fuzz: added fuzz test for listener filter tls_inspector (envoyproxy#12617) testing: fix multiple race conditions in simulated time tests (envoyproxy#12527) [tls] Move handshaking behavior into SslSocketInfo. (envoyproxy#12571) header: getting rid of exception-throwing behaviors in header files [the rest] (envoyproxy#12611) router: add new ratelimited retry backoff strategy (envoyproxy#12202) [redis_proxy] added a constraint for route.prefix().size() (envoyproxy#12637) network: add tcp listener backlog config (envoyproxy#12625) runtime: debug log that condition is always true when fractionalPercent numerator > denominator (envoyproxy#12068) WatchDog Extension hook (envoyproxy#12416) router: add dynamic metadata header formatter (envoyproxy#11858) statsd: revert visibility to public (envoyproxy#12621) Fix regression of /build_* in gitignore (envoyproxy#12630) Added a missing extension point to documentation. (envoyproxy#12620) Reverts proxy protocol test on windows (envoyproxy#12619) caching: Improved the tests and coverage of the CacheFilter tree (envoyproxy#12544) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
This file contains hidden or 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
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.
This is the continuation of #12502, as discussed here #12469.
Commit Message:
Additional Description: One notable change is that I rewrote some macro definitions using ternary operators to using lambda expressions as ternary operators require the type of operands on both sides of ":" to be the same. Replacing throw statement with a void function breaks this rule.
Risk Level: Low
Testing: All existing tests passed
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]