diff options
Diffstat (limited to 'container-di/src/main/scala/com/yahoo')
-rw-r--r-- | container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/ComponentNode.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/ComponentNode.scala b/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/ComponentNode.scala index 4261b874330..cc1745d6e35 100644 --- a/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/ComponentNode.scala +++ b/container-di/src/main/scala/com/yahoo/container/di/componentgraph/core/ComponentNode.scala @@ -113,7 +113,9 @@ class ComponentNode(componentId: ComponentId, private def initId(component: AnyRef) = { def checkAndSetId(c: AbstractComponent) { if (c.hasInitializedId && c.getId != componentId ) - throw new IllegalStateException("Component with id '" + componentId + "' has set a conflicting component id: '" + c.getId + "'") + throw new IllegalStateException( + s"Component with id '$componentId' is trying to set its component id explicitly: '${c.getId}'. " + + "This is not allowed, so please remove any call to super() in your component's constructor.") c.initId(componentId) } |