X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fnet%2Fsf%2Fopenrocket%2Fgui%2Fconfigdialog%2FComponentConfigDialog.java;h=11c4e2d62449368d21e2d50db5d9a372638cff2b;hb=c72e1c03cc0d15e11368707c38721d506ce356b9;hp=0ad6c93ac08d87f9b14699f8cbf148a8359a63fb;hpb=d23932f311312abb73801262a80ef2f6bc66818d;p=debian%2Fopenrocket diff --git a/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java b/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java index 0ad6c93a..11c4e2d6 100644 --- a/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java +++ b/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java @@ -14,8 +14,10 @@ import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.GUIUtil; import net.sf.openrocket.util.Prefs; +import net.sf.openrocket.util.Reflection; /** * A dialog that contains the configuration elements of one component. @@ -108,17 +110,17 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis try { return (RocketComponentConfig) c.newInstance(component); } catch (InstantiationException e) { - throw new RuntimeException("BUG in constructor reflection",e); + throw new BugException("BUG in constructor reflection",e); } catch (IllegalAccessException e) { - throw new RuntimeException("BUG in constructor reflection",e); + throw new BugException("BUG in constructor reflection",e); } catch (InvocationTargetException e) { - throw new RuntimeException("BUG in constructor reflection",e); + throw Reflection.handleInvocationTargetException(e); } } // Should never be reached, since RocketComponentConfig should catch all // components without their own configurator. - throw new RuntimeException("Unable to find any configurator for "+component); + throw new BugException("Unable to find any configurator for "+component); } /**