DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43910>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43910 Summary: NullPointerException throw if there is no fo:root Product: Fop Version: 0.94 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: fo tree AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] in AreaTreeHandler, if no fo:root was found in document (which can arise from time to time when you use fo together with xslt), the endDocument() method throws a nullpointerexception instead of making clean fallback (either generate empty document or throw a SAXException). Because NullPointerException is quite anonymous error, it makes it difficult for caller to properly catch it and handle it in calling code. Please note javadoc of endDocument states that it "throws SAXException if there is some error". So this probably should be throwing a SAXException("no fo:root found in document") Caused by: java.lang.NullPointerException at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:264) at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171) at net.sf.saxon.event.ContentHandlerProxy.close(ContentHandlerProxy.java:255) at net.sf.saxon.event.ImplicitResultChecker.close(ImplicitResultChecker.java:69) at net.sf.saxon.event.ProxyReceiver.close(ProxyReceiver.java:86) at net.sf.saxon.event.ComplexContentOutputter.close(ComplexContentOutputter.java:458) at net.sf.saxon.Controller.transformDocument(Controller.java:1655) at net.sf.saxon.Controller.transform(Controller.java:1438) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
