Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component In directory james.mmbase.org:/tmp/cvs-serv499
Modified Files: MMBaseComponent.java Log Message: cleared exceptions if something's wrong See also: http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/component Index: MMBaseComponent.java =================================================================== RCS file: /var/cvs/contributions/didactor2/src/core/java/nl/didactor/component/MMBaseComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- MMBaseComponent.java 21 Aug 2008 09:08:46 -0000 1.4 +++ MMBaseComponent.java 21 Aug 2008 09:42:34 -0000 1.5 @@ -13,7 +13,7 @@ /** * The didactor component wrapping an mmbase component. * @author Michiel Meeuwissen - * @version $Id: MMBaseComponent.java,v 1.4 2008/08/21 09:08:46 michiel Exp $ + * @version $Id: MMBaseComponent.java,v 1.5 2008/08/21 09:42:34 michiel Exp $ */ public class MMBaseComponent extends nl.didactor.component.Component { @@ -106,7 +106,12 @@ @Override public String getTemplateBar() { Framework fw = Framework.getInstance(); - return (String) fw.getSettingValue(getComponent().getSetting("didactor_templatebar"), fw.createSettingValueParameters()); + if (fw == null) throw new IllegalStateException(); + org.mmbase.framework.Component component = getComponent(); + if (component == null) throw new IllegalStateException("No component '" + name + "' found"); + org.mmbase.framework.Setting setting = component.getSetting("didactor_templatebar"); + if (setting == null) throw new IllegalStateException(); + return (String) fw.getSettingValue(setting, fw.createSettingValueParameters()); } } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs