1 16 package org.apache.cocoon.forms.formmodel; 17 18 import org.apache.avalon.framework.CascadingException; 19 20 23 public class IncompletenessException extends CascadingException { 24 25 private WidgetDefinition causingDefinition = null; 26 27 public IncompletenessException(String message, WidgetDefinition incomplete) { 28 super(message); 29 causingDefinition = incomplete; 30 } 31 32 public IncompletenessException(String message, WidgetDefinition incomplete , Exception e) { 33 super(message, e); 34 causingDefinition = incomplete; 35 } 36 37 public String toString() { 38 String msg = super.toString(); 39 40 if(causingDefinition!=null) 41 msg += " (Caused by widget '"+causingDefinition.getId()+"', last modified at "+causingDefinition.getLocation()+")"; 42 43 return msg; 44 } 45 } 46 | Popular Tags |