-
-
Notifications
You must be signed in to change notification settings - Fork 318
Description
Description
Hi everyone, first of all I want to mention that I really like and appreciate Structurizr and OS community work!
The ComponentFinder is truly convenient and helpful piece of software. However, when trying to find all component inside a provided Container with a specific ComponentFinderStrategy, which in turn does not return any DiscoveredComponent, the entire run() process stops with a RuntimeException.
for (ComponentFinderStrategy componentFinderStrategy : componentFinderStrategies) {
Set<DiscoveredComponent> set = componentFinderStrategy.run(typeRepository);
if (set.isEmpty()) {
throw new RuntimeException("No components were found by " + componentFinderStrategy);
}
discoveredComponents.addAll(set);
}
The resulting problem for a ComponentFinder implementation is, that all subsequently added strategies will be ignored.
Potentially this leads to incomplete "scanning" results. The current workaround is to create one ComponentFinderBuilder per ComponentFinderStrategy and wrap it with a catch clause to "ignore" or log the RuntimeException in order to proceed to the next ComponentFinderStrategy for the current Container.
Priority
Low (I have no budget and there's no rush - please add this feature for free)
More information
No response