-
Notifications
You must be signed in to change notification settings - Fork 3.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
[improve] Add PulsarExceptionBase class that supports slf4j like parameterized string formatting #18968
Conversation
@aahmed-se Please add the following content to your PR description and select a checkbox:
|
020dfae
to
d4842c1
Compare
Codecov Report
@@ Coverage Diff @@
## master #18968 +/- ##
============================================
- Coverage 49.85% 46.24% -3.61%
- Complexity 8658 10170 +1512
============================================
Files 500 683 +183
Lines 54930 67107 +12177
Branches 5867 7196 +1329
============================================
+ Hits 27386 31036 +3650
- Misses 24464 32614 +8150
- Partials 3080 3457 +377
Flags with carried forward coverage won't be shown. Click here to find out more.
|
It doesn't seem to be used anywhere in Pulsar, and I'm not sure if it should really be added. Is it just an abstract class for users? |
@congbobo184 it will be used in future pull requests, we will extend existing pulsar exceptions with this class and replace all strings with append operations with formatters. |
thanks for your answer, it seems it can add a test. could you please add a test for it? to prevent other PRs from making incorrect changes |
…string formatting
d4842c1
to
a23bcba
Compare
@congbobo184 @merlimat I have updated it and added test cases. |
Motivation
We frequently have to pass strings to exceptions, similar to log4j , this allows us to use the same parameterized formatting in both.
Modifications
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Documentation
doc
doc-required
doc-not-needed
doc-complete