summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/output.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/output.py b/lib/output.py
index d5c513e2..1278c5b1 100644
--- a/lib/output.py
+++ b/lib/output.py
@@ -84,4 +84,10 @@ def write_embroidery_file(file_path, stitch_plan, svg):
"full_jump": True,
}
- pyembroidery.write(pattern, file_path, settings)
+ try:
+ pyembroidery.write(pattern, file_path, settings)
+ except IOError as e:
+ # L10N low-level file error. %(error)s is (hopefully?) translated by
+ # the user's system automatically.
+ print >> sys.stderr, _("Error writing to %(path)s: %(error)s") % dict(path=file_path, error=e.message)
+ sys.exit(1)