X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fnet%2Fsf%2Fopenrocket%2Ffile%2Fopenrocket%2FOpenRocketLoader.java;fp=src%2Fnet%2Fsf%2Fopenrocket%2Ffile%2Fopenrocket%2FOpenRocketLoader.java;h=8eb3a8004331b92379a39cef57275de675e5034a;hb=c72e1c03cc0d15e11368707c38721d506ce356b9;hp=3b7b23d955888e5d0fd97c32967a79b8fd99830a;hpb=d23932f311312abb73801262a80ef2f6bc66818d;p=debian%2Fopenrocket diff --git a/src/net/sf/openrocket/file/openrocket/OpenRocketLoader.java b/src/net/sf/openrocket/file/openrocket/OpenRocketLoader.java index 3b7b23d9..8eb3a800 100644 --- a/src/net/sf/openrocket/file/openrocket/OpenRocketLoader.java +++ b/src/net/sf/openrocket/file/openrocket/OpenRocketLoader.java @@ -67,6 +67,7 @@ import net.sf.openrocket.simulation.FlightEvent; import net.sf.openrocket.simulation.SimulationConditions; import net.sf.openrocket.simulation.FlightEvent.Type; import net.sf.openrocket.unit.UnitGroup; +import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.Coordinate; import net.sf.openrocket.util.LineStyle; import net.sf.openrocket.util.Reflection; @@ -179,7 +180,7 @@ class DocumentConfig { constructors.put("stage", Stage.class.getConstructor(new Class[0])); } catch (NoSuchMethodException e) { - throw new RuntimeException( + throw new BugException( "Error in constructing the 'constructors' HashMap."); } } @@ -665,11 +666,11 @@ class ComponentHandler extends ElementHandler { try { c = constructor.newInstance(); } catch (InstantiationException e) { - throw new RuntimeException("Error constructing component.", e); + throw new BugException("Error constructing component.", e); } catch (IllegalAccessException e) { - throw new RuntimeException("Error constructing component.", e); + throw new BugException("Error constructing component.", e); } catch (InvocationTargetException e) { - throw new RuntimeException("Error constructing component.", e); + throw Reflection.handleInvocationTargetException(e); } parent.addChild(c);