bennidi / mbassador

Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven
MIT License
955 stars 146 forks source link

we have to call twice getCause , In IPublicationErrorHandler.handleError(PublicationError ) #146

Open yuhaqiang123 opened 7 years ago

yuhaqiang123 commented 7 years ago

PublicationError.getCause return value is InvocationTargetException type, this should the method.invoke() throws which used to indicate the execution Method internal error, but the actual IPublicationErrorHandler is to want to know what internally thrown exception Handler Method is that, but had to call twice getCause at this moment .PublicationError.getCause().getCause() to get the internal error, whether can consider to optimize the API, add getError, or getRootCause. GetHandlerCause etc, returned directly thrown internal error in handler method.