-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixes #3949 #3978
Conversation
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) { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Let's try to get this one in 0.22.0 as it's a usability issue. |
There was a problem hiding this 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.
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. |
There was a problem hiding this 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.
If a checked exception is thrown from an interceptor allow RESTeasy
exception mappers to unwrap it.