xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Improving error messages
Date Fri, 11 Apr 2003 00:40:04 GMT
Hi all,
I just committed the long proposed patch for improving some error
messages by providing line numbers etc., if available.

Unfortunately, the improvement is still partial. How should this
be developed further?

1. Certainly, the info should be made available to other places.
However, I dont want to add all the fields to Area or even Box,
and always pass all the info. It is ugly enough to pass it through
the Maker to the FOs. One possibility is to leverage the creatingFO
or generatedBy back pointer from areas to FOs, which implies to
ensure this back pointer is always or at least often enough set
properly. There are still other places where messages are printed,
for example in the property parser.

2. The FO methods, especially format() and layout(), could catch
RuntimeExceptions and wrap them in a FOPException with line info
set. Looks ugly and may cause problems (misleading info) with
delayed rendering.

3. How could problems in a renderer linked back to the original
FO, if applicable?

In general, we need a concept on
- how unpleasentness is sorted into classes (info, warning,
   recoverable error, fatal error)
- how the various classes of problems are dealt with.
For example under which circumstances is an error fatal and when
it is recoverable?
Some ideas:
* can't find/compute info which is mandatory for the output
   -> fatal, abort
* content dropped, but output is still technically valid
   -> recoverable
* unexpected layout
   -> warning
* choice of one of several possible layouts
   -> info

Please review the patch.

J.Pietschmann


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


Mime
View raw message