xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <dev.jerem...@greenmail.ch>
Subject Throwing derivatives of RuntimeException
Date Sat, 04 Jan 2003 14:59:01 GMT
Hi Joerg

> [8] Going into design here: we have three main choices: 
> - Duplicate chaining functionality in a FOP exclusive exception
>   (FOPException) and use this and derived classes exclusively, except at
>   places where java.lang.* exceptions are obviously more appropriate.
>   This is more or less the current approach, with the notable exception
>   of the hyphenation auxillary tools and a CascadingRuntimeException
>   thrown in the PS renderer (Bad, bad, never throw derivatives of
>   RuntimeException?! Jeremias, you should be ashamed! :-) 

(Disclaimer: If there was any irony in the above statement I didn't
detect it in spite of the smiley) What are you talking about??? Since
when is throwing an IllegalArgumentException (derived from
RuntimeException) A Bad Thing (tm)? I could understand if you said that
throwing a CascadingRuntimeException (or a RuntimeException) was bad
when it is actually better to really indicate a problem such as an in
PDFRenderer the CascadingRuntimeException that says "Incompatible VM" 
(IncompatibleVMException extends RuntimeException instead of

By the way, PSRenderer.java does not throw any CascadingRuntimeException.

I think you'll have to explain these things to me.

> - Use Avalon exceptions directly, don't use 

Yes, that's not so good, obviously.

> - Derive FOP specific exceptions form Avalon exceptions, and use the
>   former exclusively.

I'd like to go with a mixture of your first and third point. I'd like to
alter FOPException to derive from Avalon's CascadingException.

> Other ideas? (pij) 

Jeremias Maerki

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

View raw message