-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Open
Labels
P3no SLOno SLOpackage=eventbustype=enhancementMake an existing feature betterMake an existing feature better
Description
API(s)
`com.google.common.eventbus.Subscriber#dispatchEvent`How do you want it to be improved?
final void dispatchEvent(final Object event) {
executor.execute(
new Runnable() {
@Override
public void run() {
try {
invokeSubscriberMethod(event);
} catch (InvocationTargetException e) {
bus.handleSubscriberException(e.getCause(), context(event));
} catch(Throwable e) {
bus.handleSubscriberException(e, context(event));
}
}
});
}Why do we need it to be improved?
The Subscriber#dispatchEvent did not catch Throwable, resulting in the Error being undetected by the SubscriberExceptionHandler
Example
-Current Behavior
Desired Behavior
Error can be detected by the SubscriberExceptionHandler
Concrete Use Cases
Checklist
-
I agree to follow the code of conduct.
-
I have read and understood the contribution guidelines.
-
I have read and understood Guava's philosophy, and I strongly believe that this proposal aligns with it.
Metadata
Metadata
Assignees
Labels
P3no SLOno SLOpackage=eventbustype=enhancementMake an existing feature betterMake an existing feature better