diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-06-11 16:05:00 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-06-11 16:05:00 +0200 |
commit | 2974bae82b4253aa14f81bda7b052908c6f3fbb7 (patch) | |
tree | b4c285cacca9260b6afabbbdd2fc84ed83043c7b /container-core | |
parent | 79d37d44935305d978a3c91b2e65b43cdeaf1bd3 (diff) |
Catch IllegalArgumentException and ClassCastException to give more information.
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java b/container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java index dcc024ef2b1..31dc5e7cb77 100644 --- a/container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java +++ b/container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java @@ -156,7 +156,7 @@ public class ComponentNode extends Node { Duration duration = Duration.between(start, Instant.now()); log.log(duration.compareTo(Duration.ofMinutes(1)) > 0 ? INFO : FINE, () -> "Finished constructing " + idAndType() + " in " + duration); - } catch (InvocationTargetException | InstantiationException | IllegalAccessException e) { + } catch (InvocationTargetException | InstantiationException | IllegalAccessException | IllegalArgumentException | ClassCastException e) { StackTraceElement dependencyInjectorMarker = new StackTraceElement("============= Dependency Injection =============", "newInstance", null, -1); throw removeStackTrace(new ComponentConstructorException("Error constructing " + idAndType() + ": " + e.getMessage(), cutStackTraceAtConstructor(e.getCause(), dependencyInjectorMarker))); } |