mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
error handling for analyzer
This commit is contained in:
@@ -47,8 +47,9 @@ public interface INetlistAnalyzer {
|
||||
* @param netlists
|
||||
* @param preferredOutput optional, needed only where there's more than one possible output node.
|
||||
* @return
|
||||
* @throws TreeException
|
||||
*/
|
||||
List<Summary> summarize(List<Netlist> netlists, Node preferredOutput);
|
||||
List<Summary> summarize(List<Netlist> netlists, Node preferredOutput) throws TreeException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -159,7 +159,7 @@ public class NetlistAnalyzer {
|
||||
boolean canMerge = true;
|
||||
unique = pathsToMerge.get(0).getChildren().get(backward ? i : pathsToMerge.get(0).getChildren().size() - i - 1);
|
||||
for (Tree t : pathsToMerge) {
|
||||
if (t.getChildren().size() <= i || !t.getChildren().get(backward ? 0 : pathsToMerge.get(0).getChildren().size() - 1).equals(unique)) {
|
||||
if (t.getChildren().size() <= i || !t.getChildren().get(backward ? 0 : t.getChildren().size() - 1).equals(unique)) {
|
||||
canMerge = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user