diff options
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. " |