diff --git a/base/src/main/java/de/staropensource/sosengine/base/Engine.java b/base/src/main/java/de/staropensource/sosengine/base/Engine.java index 2fe0806..e84d5d8 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/Engine.java +++ b/base/src/main/java/de/staropensource/sosengine/base/Engine.java @@ -301,8 +301,18 @@ public final class Engine implements SubsystemMainClass { for (DependencyVector vector : resolver.resolve().getOrder()) // smol workaround order.add((DependencySubsystemVector) vector); } catch (Throwable throwable) { - if (throwable instanceof UnmetDependenciesException) - ((UnmetDependenciesException) throwable).getUnmetDependencies(); + if (throwable instanceof UnmetDependenciesException exception) { + Map<@NotNull DependencyVector, @NotNull String> unmetDependencies = exception.getUnmetDependencies(); + StringBuilder list = new StringBuilder(); + + for (DependencyVector vector : unmetDependencies.keySet()) + list.append("- ") + .append(vector.getIdentifier()) + .append(": ") + .append(unmetDependencies.get(vector)); + + logger.crash("Found unresolved dependencies:" + list, throwable); + } logger.crash("An error occurred trying to resolve subsystem dependencies: " + throwable.getClass().getName() + (throwable.getMessage() == null ? "" : ": " + throwable.getMessage())); throw throwable; }