Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-254

Remove multiple logging of exceptions in AbstractThreadSafeComponentExtensionPoint

XMLWordPrintable

      When there is something wrong with the initialization or configuration of extensions of a MultipleExtensionPoint we get multiple exceptions logged.
      Each exception shows the same kind of message, just with a different stack trace.

      So i proposed the following patch, for improving logs readability:

      Index: main/kernel/src/org/ametys/runtime/plugin/component/AbstractThreadSafeComponentExtensionPoint.java
      ===================================================================
      --- main/kernel/src/org/ametys/runtime/plugin/component/AbstractThreadSafeComponentExtensionPoint.java	(revision 504)
      +++ main/kernel/src/org/ametys/runtime/plugin/component/AbstractThreadSafeComponentExtensionPoint.java	(working copy)
      @@ -122,9 +122,7 @@
               
               if (className == null)
               {
      -            String errorMessage = "In plugin '" + pluginName + "' id '" + pluginId + "', extension '" + id + "' does not defines any class";
      -            getLogger().error(errorMessage);
      -            throw new ConfigurationException(errorMessage, configuration);
      +            throw new ConfigurationException("In plugin '" + pluginName + "' id '" + pluginId + "', extension '" + id + "' does not defines any class", configuration);
               }
               
               Class<T> extensionClass;
      @@ -135,9 +133,7 @@
               }
               catch (ClassNotFoundException ex)
               {
      -            String errorMessage = "Unable to instanciate class '" + className + "' for plugin '" + pluginName + "' / '" + pluginId + "'";
      -            getLogger().error(errorMessage);
      -            throw new ConfigurationException(errorMessage, configuration, ex);
      +            throw new ConfigurationException("Unable to instanciate class '" + className + "' for plugin '" + pluginName + "' / '" + pluginId + "'", configuration, ex);
               }
               
               try
      

            yabon Sébastien Launay (Inactive)
            yabon Sébastien Launay (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: