stop logging exceptions when trying to unregister a listener that was never registered

This commit is contained in:
jmillman 2016-06-29 14:09:14 -04:00
parent 1802a89d26
commit 034c62909f

View File

@ -211,7 +211,13 @@ public class CategoryManager {
categoryEventBus.unregister(listener);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("missing event subscriber for an annotated method. Is " + listener + " registered?")) { //NON-NLS
LOGGER.log(Level.WARNING, "Attempted to unregister {0} for category change events, but it was not registered.", listener.toString()); //NON-NLS
/*
* We don't fully understand why we are getting this exception
* when the groups should all be registered. To avoid cluttering
* the logs we have disabled recording this exception. This
* documented in issues 738 and 802.
*/
//LOGGER.log(Level.WARNING, "Attempted to unregister {0} for category change events, but it was not registered.", listener.toString()); //NON-NLS
} else {
throw e;
}