From 17e3d2b23c9116e7d6c895b8c33bf4f552b8311c Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Thu, 12 May 2005 08:33:22 +0000 Subject: [PATCH] display exception of Date.set() svn: r4564 --- gramps2/src/plugins/TestcaseGenerator.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gramps2/src/plugins/TestcaseGenerator.py b/gramps2/src/plugins/TestcaseGenerator.py index 7b4cac08a..1338c648d 100644 --- a/gramps2/src/plugins/TestcaseGenerator.py +++ b/gramps2/src/plugins/TestcaseGenerator.py @@ -419,14 +419,18 @@ class TestcaseGenerator: d.set(Date.QUAL_NONE,Date.MOD_NONE,Date.CAL_GREGORIAN,dateval[:l],"Text comment") dates.append( d) except: - print "Exception" + d = Date.Date() + d.set_as_text("Date.set Exception %s" % ("".join(traceback.format_exception(*sys.exc_info())),)) + dates.append( d) for l in range(1,len(dateval)): try: d = Date.Date() d.set(Date.QUAL_NONE,Date.MOD_SPAN,Date.CAL_GREGORIAN,dateval[:l],"Text comment") dates.append( d) except: - print "Exception" + d = Date.Date() + d.set_as_text("Date.set Exception %s" % ("".join(traceback.format_exception(*sys.exc_info())),)) + dates.append( d) d = Date.Date() d.set(Date.QUAL_NONE,Date.MOD_NONE,Date.CAL_GREGORIAN,(44,7,1789,False),"Text comment") dates.append( d) @@ -450,7 +454,6 @@ class TestcaseGenerator: ndate = None try: datestr = _dd.display( dateval) - print datestr try: ndate = _dp.parse( datestr) if not ndate: