Avoid "message" naming conflicts exception macro, inherit constructors, remove ITK_MACROEND_NOOP_STATEMENT calls#2405
Merged
dzenanz merged 3 commits intoInsightSoftwareConsortium:masterfrom Mar 15, 2021
Conversation
Replaced the very general term "message" inside the definition of
`itkSpecializedMessageExceptionMacro` by a much more specific
identifier, "exceptionDescriptionOutputStringStream", to avoid naming
conflicts in user code.
Removed the unnecessary `std::string{ ... }` construction for the result
of `std::ostringstream::str()`, as it is an `std::string` already.
119abb9 to
50b707a
Compare
Contributor
Author
|
As far as I can see, the one CI failure from ITK.Linux appears unrelated to this pull request:
|
Follow-up to: Pull request InsightSoftwareConsortium#2398 Commit e41b2ef "STYLE: C++11 inheriting constructors from ExceptionObject for 4 classes"
It appears that the `ITK_MACROEND_NOOP_STATEMENT` calls at the end of the definitions of `itkSpecializedExceptionMacro`, `itkExceptionMacro`, and `itkGenericExceptionMacro` are not really necessary, as these three macro definitions do not need to open a new scope either.
Contributor
Author
|
Thansk for the approval, @dzenanz
While I always try to have at most 72 characters as subject line of any commit, the PR subject line length is unlimited, right? :-) |
Member
|
I thought that PR might not be about "message" naming conflicts any more. |
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.
Replaced the very general term "message" inside the definition of
itkSpecializedMessageExceptionMacroby a much more specificidentifier, "exceptionDescriptionOutputStringStream", to avoid naming
conflicts in user code.
Removed the unnecessary
std::string{ ... }construction for the resultof
std::ostringstream::str(), as it is anstd::stringalready.Did inherit the exception constructors inside
itkDeclareExceptionMacro,as a follow-up to pull request #2398 commit e41b2ef
"STYLE: C++11 inheriting constructors from ExceptionObject for 4 classes"
Removed unnecessary
ITK_MACROEND_NOOP_STATEMENTcalls from exception macro definitions.