Skip to content
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

Fixes #3949 #3978

Merged
merged 1 commit into from
Sep 12, 2019
Merged

Fixes #3949 #3978

merged 1 commit into from
Sep 12, 2019

Conversation

stuartwdouglas
Copy link
Member

If a checked exception is thrown from an interceptor allow RESTeasy
exception mappers to unwrap it.

If a checked exception is thrown from an interceptor allow RESTeasy
exception mappers to unwrap it.
*/
public class ArcUndeclaredThrowableException extends RuntimeException {

public ArcUndeclaredThrowableException(Throwable cause) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the name shouldn't be more general, something like ArcException so that we could use it for similar use cases. Note that we have such exception in Weld too: org.jboss.weld.exceptions.WeldException.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very specific use case, it should not be used for general exceptions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very specific use case, it should not be used for general exceptions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, TBH I don't understand the name - why UndeclaredThrowable? In the linked reproducer the RollbackException is thrown by a JTA interceptor, or? Shouldn't we name it SubclassInvocationException or something like that?

@gsmet gsmet added this to the 0.22.0 milestone Sep 12, 2019
@gsmet
Copy link
Member

gsmet commented Sep 12, 2019

Let's try to get this one in 0.22.0 as it's a usability issue.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkouba it looks good to me but I let you merge it as it's ArC-related.

@stuartwdouglas
Copy link
Member Author

java.lang.reflect.UndeclaredThrowableException is what the JVM will throw in situations like this. If you have a java.lang.reflect.Proxy and the InvocationHandler throws a checked exception that the corresponding method does not declare then you get this exception.

Copy link
Contributor

@mkouba mkouba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Makes sense then.

@mkouba mkouba merged commit 91ebb0d into quarkusio:master Sep 12, 2019
@gsmet gsmet added backport? and removed backport? labels Sep 12, 2019
@gsmet gsmet modified the milestones: 0.23.0, 0.22.0 Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants