make debugging auto-fill easier

pull/409/head
Lex Neva 2019-03-10 18:24:10 -04:00
rodzic 0b9f95ed88
commit 110dca3c9a
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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.")