File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/com/lushprojects/circuitjs1/client Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -181,12 +181,17 @@ void buildCompNodeList() {
181181 }
182182
183183 // Flatten compNodeHash in to compNodeList
184- for (int i = 0 ; i < extNodeIds .length ; i ++) { // External Nodes First
185- if (compNodeHash .containsKey (extNodeIds [i ])) {
186- compNodeList .add (compNodeHash .get (extNodeIds [i ]));
187- compNodeHash .remove (extNodeIds [i ]);
188- } else
189- throw new IllegalArgumentException ();
184+ try {
185+ for (int i = 0 ; i < extNodeIds .length ; i ++) { // External Nodes First
186+ if (compNodeHash .containsKey (extNodeIds [i ])) {
187+ compNodeList .add (compNodeHash .get (extNodeIds [i ]));
188+ compNodeHash .remove (extNodeIds [i ]);
189+ } else
190+ throw new IllegalArgumentException ();
191+ }
192+ } catch (IllegalArgumentException e ) {
193+ compNodeList = null ;
194+ return ;
190195 }
191196 for (Entry <Integer , CircuitNode > entry : compNodeHash .entrySet ()) {
192197 int key = entry .getKey ();
You can’t perform that action at this time.
0 commit comments