Ignore:
Timestamp:
19 Oct 2016, 09:49:29 (8 years ago)
Author:
Henrik Bettermann
Message:

Catch LayoutError? traceback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py

    r14194 r14216  
    2929from reportlab.platypus import Paragraph, Image, Table, Spacer
    3030from reportlab.platypus.flowables import PageBreak
     31from reportlab.platypus.doctemplate import LayoutError
    3132from PyPDF2 import PdfFileMerger, PdfFileReader, PdfFileWriter
    3233from zope.event import notify
     
    481482            view.flash('Error in image file.')
    482483            return view.redirect(view.url(view.context))
    483 
     484        except LayoutError:
     485            view.flash('Text fields too long. PDF file cannot be created.')
     486            return view.redirect(view.url(view.context))
    484487        if mergefiles:
    485488            merger = PdfFileMerger()
Note: See TracChangeset for help on using the changeset viewer.