Ignore:
Timestamp:
4 Nov 2016, 05:23:01 (8 years ago)
Author:
Henrik Bettermann
Message:

Catch Reportlab LayoutError.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r14110 r14256  
    3131from hurry.workflow.interfaces import (
    3232    IWorkflowInfo, IWorkflowState, InvalidTransitionError)
     33from reportlab.platypus.doctemplate import LayoutError
    3334from waeup.kofa.mandates.mandate import RefereeReportMandate
    3435from waeup.kofa.applicants.interfaces import (
     
    868869                _('Your image file is corrupted. '
    869870                  'Please replace.'), type='danger')
     871            return self.redirect(self.url(self.context))
     872        except LayoutError, err:
     873            view.flash(
     874                'PDF file could not be created. Reportlab error message: %s'
     875                % escape(err.message),
     876                type="danger")
    870877            return self.redirect(self.url(self.context))
    871878        self.response.setHeader(
Note: See TracChangeset for help on using the changeset viewer.