summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-03-10 18:24:10 -0400
committerLex Neva <github.com@lexneva.name>2019-03-10 18:24:10 -0400
commit110dca3c9a6861fda9eac555157396d532ef9c3a (patch)
tree22ab776b2026a7c21a0bb1d20eb5751849ec043b
parent0b9f95ed88f6d4eb47c774c69e4fa9a03546b4b5 (diff)
make debugging auto-fill easier
-rw-r--r--lib/elements/auto_fill.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py
index b8d8d15f..1308b9e3 100644
--- a/lib/elements/auto_fill.py
+++ b/lib/elements/auto_fill.py
@@ -1,4 +1,5 @@
import math
+import sys
import traceback
from shapely import geometry as shgeo
@@ -185,6 +186,10 @@ class AutoFill(Fill):
# for one of our exceptions, just print the message
self.fatal(_("Unable to autofill: ") + str(exc))
except Exception, exc:
+ if hasattr(sys, 'gettrace') and sys.gettrace():
+ # if we're debugging, let the exception bubble up
+ raise
+
# for an uncaught exception, give a little more info so that they can create a bug report
message = ""
message += _("Error during autofill! This means that there is a problem with Ink/Stitch.")