{"action":"created","issue":{"url":"https://api.github.com/repos/bennidi/mbassador/issues/106","labels_url":"https://api.github.com/repos/bennidi/mbassador/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/bennidi/mbassador/issues/106/comments","events_url":"https://api.github.com/repos/bennidi/mbassador/issues/106/events","html_url":"https://github.com/bennidi/mbassador/issues/106","id":65128182,"number":106,"title":"Error Handler Not Recognized","user":{"login":"3xp0n3nt","id":1281275,"avatar_url":"https://avatars.githubusercontent.com/u/1281275?v=3","gravatar_id":"","url":"https://api.github.com/users/3xp0n3nt","html_url":"https://github.com/3xp0n3nt","followers_url":"https://api.github.com/users/3xp0n3nt/followers","following_url":"https://api.github.com/users/3xp0n3nt/following{/other_user}","gists_url":"https://api.github.com/users/3xp0n3nt/gists{/gist_id}","starred_url":"https://api.github.com/users/3xp0n3nt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3xp0n3nt/subscriptions","organizations_url":"https://api.github.com/users/3xp0n3nt/orgs","repos_url":"https://api.github.com/users/3xp0n3nt/repos","events_url":"https://api.github.com/users/3xp0n3nt/events{/privacy}","received_events_url":"https://api.github.com/users/3xp0n3nt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-30T03:43:31Z","updated_at":"2015-04-01T20:53:29Z","closed_at":null,"body":"After upgrading to MBassador 1.2.1, I've simplified my event bus initialization code by using the default constructor, while still opting to add an error handler via the ```MBassador``` object itself, instead of in a ```BusConfiguration```:\r\n\r\n```\r\nfinal MBassador <Event> eventBus = new MBassador <> ();\r\n\r\neventBus.addErrorHandler (new IPublicationErrorHandler() {\r\n  @Override\r\n  public void handleError (final PublicationError error) {\r\n    log.error (error.toString(), error.getCause());\r\n  }\r\n});\r\n```\r\nHowever, I now receive the following warning, which only began to occur in 1.2.1:\r\n\r\n```\r\nWARN: No error handler configured to handle exceptions during publication.\r\n    Error handlers can be added to any instance of  AbstractPubSubSupport or via BusConfiguration.\r\n    Falling back to console logger.\r\n```\r\n\r\nWhat's the point of allowing the the above method of adding an error handler in conjunction with a default constructor, if it doesn't recognize it? I hope it's just a simple bug...\r\n\r\nI really don't want to have to do this, although it does eliminate the error message:\r\n\r\n```\r\nfinal MBassador <Event> eventBus = new MBassador <> (new BusConfiguration()\r\n         .addFeature (Feature.SyncPubSub.Default())\r\n         .addFeature (Feature.AsynchronousHandlerInvocation.Default())\r\n         .addFeature (Feature.AsynchronousMessageDispatch.Default())\r\n         .setProperty (Properties.Handler.PublicationError, new IPublicationErrorHandler() {\r\n                @Override\r\n                public void handleError (final PublicationError error) {\r\n                  log.error (error.toString(), error.getCause());\r\n                }\r\n}));\r\n```\r\n\r\nP.S. Your warning log message has an extra space between the two words ```of  AbstractPubSubSupport```."},"comment":{"url":"https://api.github.com/repos/bennidi/mbassador/issues/comments/88628172","html_url":"https://github.com/bennidi/mbassador/issues/106#issuecomment-88628172","issue_url":"https://api.github.com/repos/bennidi/mbassador/issues/106","id":88628172,"user":{"login":"davidsowerby","id":2175702,"avatar_url":"https://avatars.githubusercontent.com/u/2175702?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsowerby","html_url":"https://github.com/davidsowerby","followers_url":"https://api.github.com/users/davidsowerby/followers","following_url":"https://api.github.com/users/davidsowerby/following{/other_user}","gists_url":"https://api.github.com/users/davidsowerby/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsowerby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsowerby/subscriptions","organizations_url":"https://api.github.com/users/davidsowerby/orgs","repos_url":"https://api.github.com/users/davidsowerby/repos","events_url":"https://api.github.com/users/davidsowerby/events{/privacy}","received_events_url":"https://api.github.com/users/davidsowerby/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T20:53:29Z","updated_at":"2015-04-01T20:53:29Z","body":"I think I prefer your solution using \r\n\r\n     public void handlePublicationError(PublicationError error)\r\n\r\nIt seems to works quite well.  A console message would only appear when an error occurs, and there would be no impact on performance as the check is only made in response to an error.\r\n\r\nCombining it with the suggestion from @bennidi to move the error handler away from the PubSub and into the configuration object would make a good change. \r\n"}}