summaryrefslogtreecommitdiffstats
path: root/src/pdf-invoice/pdf-invoice.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf-invoice/pdf-invoice.vala')
-rw-r--r--src/pdf-invoice/pdf-invoice.vala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pdf-invoice/pdf-invoice.vala b/src/pdf-invoice/pdf-invoice.vala
index 095dcc6..8a6242d 100644
--- a/src/pdf-invoice/pdf-invoice.vala
+++ b/src/pdf-invoice/pdf-invoice.vala
@@ -52,8 +52,12 @@ public class InvoicePDF {
}
private void render_svg(Cairo.Context ctx, string file) {
- var svg = new Rsvg.Handle.from_file(file);
- svg.render_cairo(ctx);
+ try {
+ var svg = new Rsvg.Handle.from_file(file);
+ svg.render_cairo(ctx);
+ } catch(Error e) {
+ error("Could not load SVG: %s\n", e.message);
+ }
}
private void draw_footer(Cairo.Context ctx) {