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

Need documentation for how to install error handler #120

Closed basil-bourque closed 8 years ago

basil-bourque commented 9 years ago

I cannot find any doc at all about installing an error handler. For each of my instantiated bus objects, I am getting the following message repeated in my logs:

WARN: No error handler configured to handle exceptions during publication.
Error handlers can be added to any instance of  AbstractPubSubSupport or via BusConfiguration. 
Falling back to console logger.

The main product page: https://github.com/bennidi/mbassador

…has this example code with a call to addPublicationErrorHandler:

MBassador globalBus = new MBassador(new BusConfiguration()
     .addFeature(Feature.SyncPubSub.Default())
     .addFeature(Feature.AsynchronousHandlerInvocation.Default())
     .addFeature(Feature.AsynchronousMessageDispatch.Default())
     .addPublicationErrorHandler(new IPublicationErrorHandler{...})
     .setProperty(Properties.Common.Id, "global bus"));

Some discussion about that method and IPublicationErrorHandler would be helpful.

The method addPublicationErrorHandler is found in the source code for both IBusConfiguration and BusConfiguration, but not in either of their JavaDoc.

bennidi commented 8 years ago

Checkout the examples directory in the project root.