summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/output.py8
-rw-r--r--messages.po9
2 files changed, 15 insertions, 2 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)
diff --git a/messages.po b/messages.po
index 12eb42e0..7e78e907 100644
--- a/messages.po
+++ b/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2018-08-24 21:25-0400\n"
+"POT-Creation-Date: 2018-08-24 21:44-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -688,6 +688,13 @@ msgstr ""
msgid "Generate INX files"
msgstr ""
+#. low-level file error. %(error)s is (hopefully?) translated by
+#. the user's system automatically.
+#: lib/output.py:92
+#, python-format
+msgid "Error writing to %(path)s: %(error)s"
+msgstr ""
+
#: lib/simulator.py:40
msgid "Speed up"
msgstr ""