Better exception handling

This commit is contained in:
SiboVG 2023-06-29 19:25:03 +02:00
parent 688ccc9b45
commit 78f1ee3a94

View File

@ -375,6 +375,9 @@ public class Rocket extends ComponentAssembly {
copyRocket.stageMap = new ConcurrentHashMap<>();
for( Map.Entry<Integer,AxialStage> entry : this.stageMap.entrySet()){
final AxialStage stage = (AxialStage)copyRocket.findComponent(entry.getValue().getID());
if (stage == null) {
throw new IllegalStateException("Stage not found in copy");
}
copyRocket.stageMap.put(entry.getKey(), stage);
}