Menu

Unable to layout

2008-04-17
2013-04-10
  • Patrick Godeau

    Patrick Godeau - 2008-04-17

    Hello,

    I'm beginning to use PaperClips and I find it useful.
    However, I find it difficult to track where is the problem when the layout can't be processed. An exception is thrown but is only catched by SWT, and we don't get any stack trace to find where is the problem.

    So I think the PaperClips.print method should throw an exception with a useful stack trace, don't you?

    --
    Patrick

     
    • Matthew Hall

      Matthew Hall - 2008-04-17

      The problem is that under the current design there is too much lost information about the failed layout.  This is due to PrintIterator's behavior of returning null as a magic value indicating that nothing could be laid out in the available space.  Ideally, when layout fails you want to see the tree of content, with information about each PrintIterator's cursor.  However by returning null from PrintIterator.next() we have lost that information.  I don't see a way to fix this without breaking backward compatibility.

      That is not to say that I don't plan on fixing this--just not yet.  If anybody has a bright idea of how this could be fixed without breaking backward compatibility, I'm open to alternatives.  Please fill out a feature request in the tracker and maybe we can come up with something.

      Matthew

       

Log in to post a comment.

MongoDB Logo MongoDB