diff --git a/diylc/diylc-core/src/org/diylc/presenter/InstantiationManager.java b/diylc/diylc-core/src/org/diylc/presenter/InstantiationManager.java index fa608110..6a25a3bc 100644 --- a/diylc/diylc-core/src/org/diylc/presenter/InstantiationManager.java +++ b/diylc/diylc-core/src/org/diylc/presenter/InstantiationManager.java @@ -236,7 +236,7 @@ public class InstantiationManager { @SuppressWarnings("unchecked") public List> instantiateComponent(ComponentType componentType, Template template, Point point, - Project currentProject) throws Exception { + Project currentProject) throws InstantiationException, IllegalAccessException { LOG.info("Instatiating component of type: " + componentType.getInstanceClass().getName()); // Instantiate the component. @@ -321,8 +321,7 @@ public class InstantiationManager { * @throws NoSuchMethodException * @throws SecurityException */ - public void fillWithDefaultProperties(Object object, Template template) throws IllegalArgumentException, - IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { + public void fillWithDefaultProperties(Object object, Template template) { // Extract properties. List properties = ComponentProcessor.getInstance().extractProperties(object.getClass()); Map propertyCache = new HashMap(); @@ -333,8 +332,12 @@ public class InstantiationManager { ConfigurationManager.getInstance().readObject( Presenter.DEFAULTS_KEY_PREFIX + object.getClass().getName() + ":" + property.getName(), null); if (defaultValue != null) { - property.setValue(defaultValue); - property.writeTo(object); + property.setValue(defaultValue); + try { + property.writeTo(object); + } catch (Exception e) { + LOG.error("Could not write property " + property.getName(), e); + } } } if (template != null) { @@ -344,8 +347,12 @@ public class InstantiationManager { LOG.warn("Cannot find property " + pair.getKey()); } else { LOG.debug("Filling value from template for " + pair.getKey()); - property.setValue(pair.getValue()); - property.writeTo(object); + property.setValue(pair.getValue()); + try { + property.writeTo(object); + } catch (Exception e) { + LOG.error("Could not write property " + property.getName(), e); + } } } } diff --git a/diylc/diylc-swing/library/main.jar b/diylc/diylc-swing/library/main.jar index c5e38b64..09ba0ed9 100644 Binary files a/diylc/diylc-swing/library/main.jar and b/diylc/diylc-swing/library/main.jar differ