import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
+import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.ChangeSource;
+import net.sf.openrocket.util.Reflection;
/**
try {
return (Boolean)getMethod.invoke(source);
} catch (IllegalAccessException e) {
- throw new RuntimeException("getMethod execution error for source "+source,e);
+ throw new BugException("getMethod execution error for source "+source,e);
} catch (InvocationTargetException e) {
- throw new RuntimeException("getMethod execution error for source "+source,e);
+ throw Reflection.handleWrappedException(e);
}
}
try {
setMethod.invoke(source, new Object[] { (Boolean)b });
} catch (IllegalAccessException e) {
- throw new RuntimeException("setMethod execution error for source "+source,e);
+ throw new BugException("setMethod execution error for source "+source,e);
} catch (InvocationTargetException e) {
- throw new RuntimeException("setMethod execution error for source "+source,e);
+ throw Reflection.handleWrappedException(e);
}
}
try {
return (Boolean)getEnabled.invoke(source);
} catch (IllegalAccessException e) {
- throw new RuntimeException("getEnabled execution error for source "+source,e);
+ throw new BugException("getEnabled execution error for source "+source,e);
} catch (InvocationTargetException e) {
- throw new RuntimeException("getEnabled execution error for source "+source,e);
+ throw Reflection.handleWrappedException(e);
}
}