Cocooners,

After migrating to new Source interface (extended from
XMLizable), certain exception handling issues arised:

 o Source is unable to throw ProcessingException anymore
(from toSAX method).

Result (in SitemapSource):

 o ProcessingException is wrapped into SAXException

But, getInputSource/getInputStream still can throw
ProcesingException. Result:

 o ProcessingException is wrapped into SAXException, which is
wrapped into ProcessingException (again)

As a result, Sitemap might get either SAXException[ProcessingException],
or even ProcessingException[SAXException[ProcessingException]],
which makes exception handling code ugly and unclear.

Same story applies to FileGenerator and may be to other
components as well.

Proposed solution:
1. Preserve meaningful exceptions up to the exception
handling point (sitemap)
2. Add "throws ProcessingException" to toSAX method of
XMLizable (to satisfy point 1)
3. Think about how to handle exception before writing
"throw new ...Exception("...", exception)"

I would love to hear suggestions from others on this topic.

Regards,
Vadim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to