I'm confused--why is OK to throw SAXExceptions but not
its child SAXParseExceptions?  With the latter, it
just holds locator information necessary to pinpoint
the problem for the user.  Please elaborate.

Java gives us a large family of predefined exceptions
for use in our coding--I'm leery of proclamations of
them being No Good and that each and every Java
application must re-invent their own exceptions
instead.  That just seems sloppy.

Glen  (who wanted to get rid of FOPException and just
rely on the Java-defined exceptions)

--- Jeremias Maerki <[EMAIL PROTECTED]> wrote:

> Big +1 for the FOPException subclasses. However, I
> wonder if
> FOPException should have SAXException as its
> baseclass. Almost all FOP
> exceptions will probably result in SAXExceptions as
> the whole processing
> occurs between startDocument() and endDocument() SAX
> events, but most
> FOP exceptions are not really SAX-related. I can't
> pinpoint it, yet, but
> it somehow doesn't feel right. This is not a veto to
> this change. I'm
> only stating what I'm thinking. Consider it a +0 for
> the proposed
> hierarchy. I agree however, that SAXParseExceptions
> shouldn't be thrown
> from within FOP.
> 
> On 26.10.2004 20:18:15 Finn Bock wrote:
> > I would like to make some changes to the
> exceptions used in tree building.
> > 
> > First, I dislike throwing SAXParseException from
> within FOP. In my 
> > opinion SAXParseException are for reporting
> problems during the parsing 
> > of XML, not for reporting subsequent problems with
> the FO tree.
> > 
> > Second, the exceptions used in FOP should form a
> structure where 
> > concrete subclass exception are thrown and a
> common superclass can be 
> > used for catching all the different exceptions.
> > 
> > My proposal for the exception hierarchy look like
> this:
> > 
> > - SAXException
> >    - FOPException
> >      - ValidateException
> >      - PropertyException
> > 
> > Putting all our exceptions into one hierarchy that
> inherit from 
> > SAXException helps reduce the number of wrapped
> exception.
> > 
> > I've uploaded a patch which changes the FO tree
> building and property 
> > code. The benefit of the patch is the reduced
> number of blind catches:
> > 
> >      } catch (XXXException e) {
> >          // log.error(e);
> >      }
> > 
> > Any objections?
> 
> 
> 
> Jeremias Maerki
> 
> 

Reply via email to