Implement @ThrowsException annotation#135
Open
d367wang wants to merge 14 commits intoopprop:masterfrom
Open
Conversation
Member
|
@lnsun Can you have a pass through these changes? |
Member
lnsun
reviewed
Jun 22, 2020
Member
There was a problem hiding this comment.
I would like to make this an array, since a method could throw multiple different exceptions.
lnsun
reviewed
Jun 22, 2020
Member
There was a problem hiding this comment.
How about "Indicate whether this node terminates the execution of current method and exits the program immediately"
lnsun
reviewed
Jun 22, 2020
Member
There was a problem hiding this comment.
The default is already decleared in the annotation as Throwable, is this line accessible in any way?
lnsun
reviewed
Jun 22, 2020
| // get type of thrown exception | ||
| String cls = | ||
| AnnotationUtils.getElementValueClassName(throwAnno, "value", false) | ||
| .toString(); |
Member
There was a problem hiding this comment.
If value is changing to array, maybe this part needs to be updated
Member
d367wang
commented
Aug 27, 2020
Author
There was a problem hiding this comment.
About the choice of the type of value, I think there are the following questions:
- Whether Error should be included.
- Should the checked exceptions be included? Although uncaught checked exceptions are always declared in the
throwsclause in the method signature, it cannot express the behavior of "unconditionally throws such exception", which can be supplemented by@ThrowsExceptionannotation.
…into throw-exception-annotation
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 PR implements @ThrowsException annotation and fixes issue #2076