From 90e07c8cfc29079078ee2f81dc6dcd09196b18ee Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 17 Jan 2013 19:48:37 +0000 Subject: [PATCH] PdfDocGen: Report cause of failure on all exceptions not just file open ones. Expat can raise exceptions too! svn: r21153 --- gramps/plugins/docgen/pdfdoc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/docgen/pdfdoc.py b/gramps/plugins/docgen/pdfdoc.py index fc56f00a6..3f2dc22c9 100644 --- a/gramps/plugins/docgen/pdfdoc.py +++ b/gramps/plugins/docgen/pdfdoc.py @@ -95,8 +95,9 @@ class PdfDoc(libcairodoc.CairoDoc): except IOError as msg: errmsg = "%s\n%s" % (_("Could not create %s") % filename, msg) raise ReportError(errmsg) - except: - raise ReportError(_("Could not create %s") % filename) + except Exception as err: + errmsg = "%s\n%s" % (_("Could not create %s") % filename, err) + raise ReportError(errmsg) surface.set_fallback_resolution(300, 300) cr = cairo.Context(surface) fontmap = PangoCairo.font_map_new()