org.apache.cocoon.generation
Class ExceptionGenerator
java.lang.Object
org.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ExceptionGenerator
- All Implemented Interfaces:
- org.apache.cocoon.generation.Generator, Poolable, Recyclable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.xml.XMLProducer
- public class ExceptionGenerator
- extends org.apache.cocoon.generation.AbstractGenerator
A generator that dumps an XML representation of the exception raised during
pipeline execution.
XML representation includes root cause exception message, XML content for all
XMLizable
exceptions in the chain, the Cocoon stack trace reflecting all
locations the original exception went through, the root cause exception stacktrace
and the full exception stacktrace.
The XML representation of the exception has following structure:
<ex:exception-report xmlns:ex="http://apache.org/cocoon/exception/1.0"
class="root.cause.class.Name">
<ex:location uri="..." line="..." column="...">
...
</ex:location>
<ex:message>
root cause message
</ex:message>
<!-- for each XMLizable exception in the cause chain: -->
<ex:content>
<-- output of XMLizable exception -->
</ex:content>
<ex:cocoon-stacktrace>
<!-- for each exception in the cause chain -->
<ex:exception>
<ex:message>...</ex:message>
<ex:locations>...</ex:locations>
</ex:exception>
</ex:cocoon-stacktrace>
<ex:stacktrace>
<-- root cause stacktrace -->
</ex:stacktrace>
<ex:full-stacktrace>
<-- full cause chain stacktrace -->
</ex:full-stacktrace>
</ex:exception-report>
- Since:
- 2.1.8
- Version:
- $Id: ExceptionGenerator.html 1304280 2012-03-23 11:18:01Z ilgrosso $
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator |
objectModel, parameters, resolver, source |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator |
recycle |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
EXCEPTION_NS
public static final String EXCEPTION_NS
- See Also:
- Constant Field Values
ExceptionGenerator
public ExceptionGenerator()
setup
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws org.apache.cocoon.ProcessingException,
SAXException,
IOException
- Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException
generate
public void generate()
throws IOException,
SAXException,
org.apache.cocoon.ProcessingException
- Throws:
IOException
SAXException
org.apache.cocoon.ProcessingException
toSAX
public static void toSAX(Throwable thr,
ContentHandler handler)
throws SAXException
- Throws:
SAXException
Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.