Author: vgritsenko Date: Fri Apr 29 11:13:40 2005 New Revision: 165322 URL: http://svn.apache.org/viewcvs?rev=165322&view=rev Log: handle SourceException
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/SourceUtil.java Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/SourceUtil.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/SourceUtil.java?rev=165322&r1=165321&r2=165322&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/SourceUtil.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/SourceUtil.java Fri Apr 29 11:13:40 2005 @@ -96,9 +96,13 @@ source.toSAX(handler); } catch (SAXException e) { // Unwrap ProcessingException, IOException, and extreme cases of SAXExceptions. + // Handle SourceException. // See also handleSAXException final Exception cause = e.getException(); if (cause != null) { + if (cause instanceof SourceException) { + handle((SourceException) cause); + } if (cause instanceof ProcessingException) { throw (ProcessingException) cause; } @@ -447,6 +451,11 @@ final Exception cause = e.getException(); if (cause != null) { // Unwrap ProcessingException, IOException, and extreme cases of SAXExceptions. + // Handle SourceException. + // See also toSax(XMLizable, ContentHandler + if (cause instanceof SourceException) { + handle((SourceException) cause); + } if (cause instanceof ProcessingException) { throw (ProcessingException) cause; }