Skip to content

Commit ea92757

Browse files
committed
safer paste operation
1 parent f713d5b commit ea92757

File tree

1 file changed

+4
-2
lines changed
  • src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle

1 file changed

+4
-2
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/Paste.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ public ArrayList<CSG> process(CSG ic, int depth) {
5656
CSG source = CaDoodleFile.getByName(back, from);
5757
if (source.isGroupResult()) {
5858
ArrayList<String> c = constituants(back, from);
59-
if(c.size()<1)
60-
throw new RuntimeException("A group result must have at least 1 constituants!");
59+
if(c.size()<1) {
60+
new RuntimeException("A group result must have at least 1 constituants!").printStackTrace();;
61+
continue;
62+
}
6163
String newGroupName = CaDoodleFile.getByName(back, cpMap.get(from)).getName();
6264
for (String s : c) {
6365
CSG dest = CaDoodleFile.getByName(back, s);

0 commit comments

Comments
 (0)