stephan 2004/04/04 10:16:17
Modified: src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java FormInstance.java Log: Using CascadingRunetimeException. Revision Changes Path 1.5 +8 -7 cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java Index: FormInstance.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FormInstance.java 4 Apr 2004 06:35:08 -0000 1.4 +++ FormInstance.java 4 Apr 2004 17:16:17 -0000 1.5 @@ -15,9 +15,10 @@ */ package org.apache.cocoon.forms.flow.java; - + import java.util.Locale; +import org.apache.avalon.framework.CascadingRuntimeException; import org.apache.cocoon.components.flow.FlowHelper; import org.apache.cocoon.components.flow.java.AbstractContinuable; import org.apache.cocoon.components.flow.java.VarMap; @@ -66,7 +67,7 @@ // TODO : do we keep this ? // this.formWidget = new Widget(this.form); could not create instance } catch (Exception e) { - throw new RuntimeException(e.toString()); + throw new CascadingRuntimeException("Could not create form instance", e); } finally { releaseComponent(formMgr); if (src != null) resolver.release(src); @@ -98,7 +99,7 @@ // this.formWidget = new Widget(form); could not create instance // this.local = cocoon.createPageLocal(); PageLocal ? } catch (Exception e) { - throw new RuntimeException(e.toString()); + throw new CascadingRuntimeException("Could not create form instance", e); } finally { releaseComponent(formMgr); if (src != null) resolver.release(src); @@ -258,7 +259,7 @@ source = resolver.resolveURI(bindingURI); this.binding = bindingManager.createBinding(source); } catch (Exception e) { - throw new RuntimeException(e.toString()); + throw new CascadingRuntimeException("Could not create bindinh", e); } finally { if (source != null) resolver.release(source); @@ -274,7 +275,7 @@ try { this.binding.loadFormFromModel(this.form, object); } catch (Exception e) { - throw new RuntimeException(e.toString()); + throw new CascadingRuntimeException("Could not load form from model", e); } } @@ -285,7 +286,7 @@ try { this.binding.saveFormToModel(this.form, object); } catch (Exception e) { - throw new RuntimeException(e.toString()); + throw new CascadingRuntimeException("Could not save form into model", e); } }