summaryrefslogtreecommitdiff
path: root/lib/elements/element.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2022-12-19 21:11:50 +0100
committerGitHub <noreply@github.com>2022-12-19 21:11:50 +0100
commita4f86a3106dff5d342380a19beac5191026bfb08 (patch)
treeb4a208ee1bea986bb455235a0770f55392eaa40c /lib/elements/element.py
parent4286090570832186edab14b24c7dc8cd2fba7c65 (diff)
Point to troubleshoot in fatal error message (#1967)
* point to troubleshoot in fatal error message * shapely version
Diffstat (limited to 'lib/elements/element.py')
-rw-r--r--lib/elements/element.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index df9e1b95..436423a4 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -380,7 +380,7 @@ class EmbroideryElement(object):
return patches
- def fatal(self, message):
+ def fatal(self, message, point_to_troubleshoot=False):
label = self.node.get(INKSCAPE_LABEL)
id = self.node.get("id")
if label:
@@ -389,8 +389,11 @@ class EmbroideryElement(object):
name = id
# L10N used when showing an error message to the user such as
- # "Some Path (path1234): error: satin column: One or more of the rungs doesn't intersect both rails."
- error_msg = "%s: %s %s" % (name, _("error:"), message)
+ # "Failed on PathLabel (path1234): Satin column: One or more of the rungs doesn't intersect both rails."
+ error_msg = "%s %s: %s" % (_("Failed on "), name, message)
+ if point_to_troubleshoot:
+ error_msg += "\n\n%s" % _("Please run Extensions > Ink/Stitch > Troubleshoot > Troubleshoot objects. "
+ "This will indicate the errorneus position.")
inkex.errormsg(error_msg)
sys.exit(1)
@@ -425,4 +428,4 @@ class EmbroideryElement(object):
for error in self.validation_errors():
# note that self.fatal() exits, so this only shows the first error
- self.fatal(error.description)
+ self.fatal(error.description, True)