You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jeremias Maerki <de...@jeremias-maerki.ch> on 2008/03/07 15:20:28 UTC

What to convert to events and what not...

I'm almost finished event-izing the FO tree. I've stumbled over the
following:

In RetrieveMarker.java:

    public void bindMarker(Marker marker) {
        if (marker.getChildNodes() != null) {
            try {
                cloneFromMarker(marker);
            } catch (FOPException exc) {
                log.error("fo:retrieve-marker unable to clone "
                        + "subtree of fo:marker (marker-class-name="
                        + marker.getMarkerClassName() + ")", exc);
                return;
            }
        } else if (log.isInfoEnabled()) {
            log.info("Empty marker retrieved...");
        }
        return;
    }

Is that exception something that the user has to deal with? Or is the
occurrence of this exception an indicator the something internal to FOP
went wrong? And what about the "Empty marker retrieved..."? INFO-level,
hmm.

Thanks for any insight!

Jeremias Maerki


Re: What to convert to events and what not...

Posted by Andreas Delmelle <an...@telenet.be>.
On Mar 7, 2008, at 15:20, Jeremias Maerki wrote:

Hi Jeremias

> I'm almost finished event-izing the FO tree. I've stumbled over the
> following:
>
> In RetrieveMarker.java:
>
>     public void bindMarker(Marker marker) {
>         if (marker.getChildNodes() != null) {
>             try {
>                 cloneFromMarker(marker);
>             } catch (FOPException exc) {
>                 log.error("fo:retrieve-marker unable to clone "
>                         + "subtree of fo:marker (marker-class-name="
>                         + marker.getMarkerClassName() + ")", exc);
>                 return;
>             }
>         } else if (log.isInfoEnabled()) {
>             log.info("Empty marker retrieved...");
>         }
>         return;
>     }
>
> Is that exception something that the user has to deal with? Or is the
> occurrence of this exception an indicator the something internal to  
> FOP
> went wrong?

I think this should be dealt with by the user. For example, the  
validation of properties could cause an exception (since the real  
parsing of string-values into properties is deferred for markers).

> And what about the "Empty marker retrieved..."? INFO-level,
> hmm.

Right, this seems like an oversight of mine, and should actually be  
debug-level or even trace-level.


Cheers

Andreas