mqlight / java-mqlight

This Java package provides the high-level API by which you can interact with the MQ Light runtime.
Apache License 2.0
10 stars 9 forks source link

Using NonBlockingClientAdapter can conceal error information #28

Closed prestona closed 8 years ago

prestona commented 8 years ago

If I extend NonBlockingClientAdapter, but don't override the default implementations for both the onRetrying and onStopping methods then I can miss useful exception messages that could help me debug problems with my application.

The default implementations for onRetrying and onStopping should log any exceptions passed in as arguments - to make it more difficult for someone to miss this information. Such a change would not affect anyone who already overrides these methods (and presumably is looking at the exceptions being passed in). Anyone who doesn't override these methods - and doesn't want the exceptions to be logged can trivially override the methods and specify an empty method body.