Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/106#discussion_r59540009
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
    @@ -137,9 +153,19 @@ public void removedBundle(Bundle bundle, BundleEvent 
bundleEvent, Iterable<? ext
                 }
             }
     
    +        private void removeFromCatalog(CatalogItem<?, ?> item) {
    +            try {
    +                
getManagementContext().getCatalog().deleteCatalogItem(item.getSymbolicName(), 
item.getVersion());
    +            } catch (Exception e) {
    +                LOG.warn("Failed to remove {} {} from catalog as {}", new 
String[] {
    +                    item.getSymbolicName(), item.getVersion(), 
e.getMessage()
    --- End diff --
    
    Why not pass the exception as a throwable argument to log, instead of 
including the message only. Could mask an underlying problem (for example NPE 
will have an empty message).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to