mbassador
mbassador copied to clipboard
we have to call twice getCause , In IPublicationErrorHandler.handleError(PublicationError )
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.