From 110dca3c9a6861fda9eac555157396d532ef9c3a Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 10 Mar 2019 18:24:10 -0400 Subject: make debugging auto-fill easier --- lib/elements/auto_fill.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/elements/auto_fill.py') 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.") -- cgit v1.2.3