cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: AW: New Source Interface & Exception Handling Issues
Date Fri, 07 Sep 2001 11:23:24 GMT
Vadim,

+1 from me too. Please go ahead with this.

Thanks,
dims

--- Carsten Ziegeler <cziegeler@sundn.de> wrote:
> > Vadim Gritsenko wrote:
> > 
> > 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)
> +1
> 
> > 2. Add "throws ProcessingException" to toSAX method of
> > XMLizable (to satisfy point 1)
> +1, AFAIR the old stream() method did throw the ProcessingException.
> 
> 
> Carsten
> 
> > 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: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message