Hi Team,

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?

regards,
finn








Reply via email to