public CircularDependencyException(BundlableNode bundlableNode, Set<SourceModule> sourceModules) throws ModelOperationException {
super("Circular dependency detected: " + getCircularDependency(bundlableNode, sourceModules));
}
private static String getCircularDependency(BundlableNode bundlableNode, Set<SourceModule> sourceModules) throws ModelOperationException {
SourceModule initialSourceModule = sourceModules.iterator().next();
ArrayList<String> dependencyChain = new ArrayList<>();
dependencyChain.add(initialSourceModule.getPrimaryRequirePath());
List<String> circularDependency = null;
for(SourceModule sourceModule : sourceModules) {
dependencyChain = new ArrayList<>();
dependencyChain.add(sourceModule.getPrimaryRequirePath());