commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester package.html
Date Tue, 13 Jan 2004 20:23:26 GMT
rdonkin     2004/01/13 12:23:26

  Modified:    digester/src/java/org/apache/commons/digester package.html
  Added debugging tips concerning SAX error handling.
  Revision  Changes    Path
  1.25      +41 -1     jakarta-commons/digester/src/java/org/apache/commons/digester/package.html
  Index: package.html
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/package.html,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- package.html	6 Jan 2004 22:15:57 -0000	1.24
  +++ package.html	13 Jan 2004 20:23:25 -0000	1.25
  @@ -19,6 +19,7 @@
   <a href="#doc.Namespace">[Namespace Aware Parsing]</a>
   <a href="#doc.Pluggable">[Pluggable Rules Processing]</a>
   <a href="#doc.RuleSets">[Encapsulated Rule Sets]</a>
  +<a href="#doc.troubleshooting">[Troubleshooting]</a>
   <a href="#doc.FAQ">[FAQ]</a>
   <a href="#doc.Limits">[Known Limitations]</a>
  @@ -992,7 +993,46 @@
       the same set of nested elements at different nesting levels within an
       XML document.</li>
  +<a name="doc.troubleshooting"></a>
  +<h4>Debugging Exceptions</h4>
  +<code>Digester</code> is based on <a href=''>SAX</a>.
  +Digestion throws two kinds of <code>Exception</code>:
  +    <li><code></code></li>
  +    <li><code>org.xml.sax.SAXException</code></li>
  +The first is rarely thrown and indicates the kind of fundemental IO exception
  +that developers know all about. The second is thrown by SAX parsers when the processing
  +of the XML cannot be completed. So, to diagnose the cause a certain familiarity with 
  +the way that SAX error handling works is very useful. 
  +<h5>Diagnosing SAX Exceptions</h5>
  +This is a short, potted guide to SAX error handling strategies. It's not intended as a
  +proper guide to error handling in SAX.
  +When a SAX parser encounters a problem with the xml (well, ok - sometime after it 
  +encounters a problem) it will throw a 
  +<a href=''>
  +SAXParseException</a>. This is a subclass of <code>SAXException</code>
and contains
  +a bit of extra information about what exactly when wrong - and more importantly,
  +where it went wrong. If you catch an exception of this sort, you can be sure that
  +the problem is with the XML and not <code>Digester</code> or your rules.
  +It is usually a good idea to catch this exception and log the extra information
  +to help with diagnosing the reason for the failure.
  +General <a href=''>
  +SAXException</a>'s may wrap a causal exception. When exceptions are
  +throw by <code>Digester</code> each of these will be wrapped into a 
  +<code>SAXException</code> and rethrown. So, catch these and examine the wrapped
  +exception to diagnose what went wrong.
   <a name="doc.FAQ"></a>
   <h3>Frequently Asked Questions</h3>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message