-
Improvement
-
Resolution: Fixed
-
Major
-
1.1.8
-
None
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