platypus.doctemplate: Added frame and pagetemplate id to the 'flowable too large' LayoutError.
--- a/src/reportlab/platypus/doctemplate.py Tue Mar 03 12:15:17 2009 +0000
+++ b/src/reportlab/platypus/doctemplate.py Tue Mar 03 15:22:29 2009 +0000
@@ -691,7 +691,8 @@
flowables.insert(i,f) # put split flowables back on the list
else:
if hasattr(f,'_postponed'):
- ident = "Flowable %s too large on page %d" % (self._fIdent(f,60,frame), self.page)
+ ident = "Flowable %s too large on page %d in frame '%s' of template '%s'" % \
+ (self._fIdent(f,60,frame), self.page, self.frame.id, self.pageTemplate.id)
#leave to keep apart from the raise
raise LayoutError(ident)
# this ought to be cleared when they are finally drawn!
--- a/tests/test_platypus_general.py Tue Mar 03 12:15:17 2009 +0000
+++ b/tests/test_platypus_general.py Tue Mar 03 15:22:29 2009 +0000
@@ -443,8 +443,8 @@
('Quarter 1',100,200,300,400),
('Quarter 2',100,200,300,400),
('Total',200,400,600,800)),
- (72,36,36,36,36),
- (24, 16,16,18)
+ (7200,360,360,360,360),
+ (24000000000000000000000, 16,16,18)
)
style = platypus.TableStyle([('ALIGN', (1,1), (-1,-1), 'RIGHT'),
('ALIGN', (0,0), (-1,0), 'CENTRE'),