| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!--+ |
| | $Id$ |
| +--> |
| <samples name="Error Handling Samples" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| |
| <group name="Back"> |
| <sample name="Back" href="../"> |
| Back to the samples home page. |
| </sample> |
| </group> |
| |
| <group name="Cocoon Exceptions"> |
| <note>Demonstrates common Cocoon exceptions and default error handling.</note> |
| <sample name="SAXParseException" href="exception/generror"> |
| Attempt to read invalid XML file. |
| </sample> |
| <sample name="ResourceNotFoundException" href="not-exists"> |
| Attempt to read non existent file. |
| </sample> |
| <sample name="ProcessingException" href="processing"> |
| General processing error. |
| </sample> |
| <sample name="SAXException" href="sax"> |
| SAX processing error. |
| </sample> |
| <sample name="Wrapped ProcessingException" href="saxWrapped"> |
| General processing error wrapped in SAX exception. |
| </sample> |
| </group> |
| |
| <group name="Java Exceptions"> |
| <note>Demonstrates common Java exceptions and default error handling.</note> |
| <sample name="NullPointerException" href="nullPointer"> |
| Generate NullPointerException. |
| </sample> |
| <sample name="IOException" href="io"> |
| Generate IOException. |
| </sample> |
| <note> |
| Since Cocoon does not process java.lang.Error (and derived objects), |
| behavior of this sample will depend on behavior of servlet engine. |
| In case of Jetty and Tomcat, they will show empty page and print |
| Error's stacktrace to the console. |
| </note> |
| <sample name="Error" href="exception/error"> |
| Generate Error. |
| </sample> |
| </group> |
| |
| <group name="Custom Exception Handling"> |
| <note>Demonstrates custom error handling of Cocoon and Application exceptions.</note> |
| <sample name="ResourceNotFoundException" href="exception/notFound"> |
| Generate ResourceNotFoundException. |
| </sample> |
| <sample name="ValidationException" href="exception/validation"> |
| Generate ValidationException. |
| </sample> |
| <sample name="ApplicationException (1)" href="exception/application?code=1"> |
| Generate ApplicationException with error code 1. |
| </sample> |
| <sample name="ApplicationException (2)" href="exception/application?code=2"> |
| Generate ApplicationException with error code 2. |
| </sample> |
| <sample name="ApplicationException (3)" href="exception/application?code=3"> |
| Generate ApplicationException with error code 3. |
| </sample> |
| <sample name="Internal Requests" href="internal/"> |
| Internal requests error handling is the new feature introduced in Cocoon 2.1.7 |
| provides a way to handle exceptions for aggregated, included, or used elsewhere, |
| internal pipelines. |
| </sample> |
| </group> |
| </samples> |