diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-04-18 10:06:07 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-04-18 10:06:07 +0000 |
commit | 6ef7ba4acbc6813dc15670630a47b9e5ad9d87ce (patch) | |
tree | fba2ad62b47b94d0b5e1002376345f301cebbe73 /src/java/org/apache/fop/area | |
parent | c1293d0e53b566b1c7fc0cddef997785aabb73bd (diff) | |
download | xmlgraphics-fop-6ef7ba4acbc6813dc15670630a47b9e5ad9d87ce.tar.gz xmlgraphics-fop-6ef7ba4acbc6813dc15670630a47b9e5ad9d87ce.zip |
Merged revisions 649279,649283,649285,649393,649396,649420 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r649279 | jeremias | 2008-04-17 22:23:15 +0100 (Thu, 17 Apr 2008) | 1 line
clone() did not propagate the page's page index.
........
r649283 | jeremias | 2008-04-17 22:25:02 +0100 (Thu, 17 Apr 2008) | 1 line
Throw a useful exception when the user agent isn't set on the renderer. This has been a problem for more than one person setting up their own renderer using FOUserAgent.setRendererOverride().
........
r649285 | jeremias | 2008-04-17 22:27:46 +0100 (Thu, 17 Apr 2008) | 2 lines
Split PrintRenderer into PageableRenderer and PrintRenderer (extends PageableRenderer). This allows the use of FOP with JPS. A new example illustrates how this is done.
Removed the code that sets start/end/copies from system properties (now done through renderer options).
........
r649393 | jeremias | 2008-04-18 08:40:27 +0100 (Fri, 18 Apr 2008) | 1 line
Forgot to include in commit for revision 649285.
........
r649396 | jeremias | 2008-04-18 08:44:32 +0100 (Fri, 18 Apr 2008) | 1 line
Introduced PageProductionException and fixed exception throwing for the event related to this exception. It's a RuntimeException descendant as making it a checked exception would have made changes necessary to at least a dozen more classes. Our overall exception style is still not so good.
........
r649420 | jeremias | 2008-04-18 10:16:28 +0100 (Fri, 18 Apr 2008) | 1 line
Fixed build problem. FOPException is no longer thrown there.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@649444 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area')
-rw-r--r-- | src/java/org/apache/fop/area/PageViewport.java | 1 | ||||
-rw-r--r-- | src/java/org/apache/fop/area/RenderPagesModel.java | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index da7ef1def..745160d44 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -124,6 +124,7 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl if (original.extensionAttachments != null) { this.extensionAttachments = new java.util.ArrayList(original.extensionAttachments); } + this.pageIndex = original.pageIndex; this.pageNumber = original.pageNumber; this.pageNumberString = original.pageNumberString; this.page = (Page)original.page.clone(); diff --git a/src/java/org/apache/fop/area/RenderPagesModel.java b/src/java/org/apache/fop/area/RenderPagesModel.java index b21566902..64159cca7 100644 --- a/src/java/org/apache/fop/area/RenderPagesModel.java +++ b/src/java/org/apache/fop/area/RenderPagesModel.java @@ -31,6 +31,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.fonts.FontInfo; import org.apache.fop.render.Renderer; +import org.apache.fop.render.RendererEventProducer; /** * This uses the AreaTreeModel to store the pages @@ -115,8 +116,12 @@ public class RenderPagesModel extends AreaTreeModel { String err = "Error while rendering page " + page.getPageNumberString(); log.error(err, re); throw re; - } catch (Exception e) { - //TODO use error handler to handle this FOP or IO Exception or propagate exception + } catch (IOException ioe) { + RendererEventProducer eventProducer = RendererEventProducer.Provider.get( + renderer.getUserAgent().getEventBroadcaster()); + eventProducer.ioError(this, ioe); + } catch (FOPException e) { + //TODO use error handler to handle this FOPException or propagate exception String err = "Error while rendering page " + page.getPageNumberString(); log.error(err, e); throw new IllegalStateException("Fatal error occurred. Cannot continue. " |