1 16 package org.apache.cocoon.components.elementprocessor; 17 18 24 public class CannotCreateElementProcessorException 25 extends Exception 26 { 27 private String _element_name; 28 private String _reason; 29 30 36 37 public CannotCreateElementProcessorException(final String reason) 38 { 39 _element_name = null; 40 _reason = (reason == null) ? "" : reason; 41 } 42 43 public void setElementName(final String name) 44 { 45 _element_name = name; 46 } 47 48 55 56 public String getMessage() 57 { 58 StringBuffer buffer = new StringBuffer (); 59 60 buffer.append("Could not create ElementProcessor for element "); 61 buffer.append(_element_name); 62 buffer.append(" "); 63 if (_reason.length() != 0) { 64 buffer.append("(").append(_reason).append(")"); 65 } 66 return buffer.toString(); 67 } 68 } | Popular Tags |