display exception of Date.set()

svn: r4564
This commit is contained in:
Martin Hawlisch 2005-05-12 08:33:22 +00:00
parent 3966f768f7
commit 17e3d2b23c

View File

@ -419,14 +419,18 @@ class TestcaseGenerator:
d.set(Date.QUAL_NONE,Date.MOD_NONE,Date.CAL_GREGORIAN,dateval[:l],"Text comment") d.set(Date.QUAL_NONE,Date.MOD_NONE,Date.CAL_GREGORIAN,dateval[:l],"Text comment")
dates.append( d) dates.append( d)
except: 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)): for l in range(1,len(dateval)):
try: try:
d = Date.Date() d = Date.Date()
d.set(Date.QUAL_NONE,Date.MOD_SPAN,Date.CAL_GREGORIAN,dateval[:l],"Text comment") d.set(Date.QUAL_NONE,Date.MOD_SPAN,Date.CAL_GREGORIAN,dateval[:l],"Text comment")
dates.append( d) dates.append( d)
except: 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 = Date.Date()
d.set(Date.QUAL_NONE,Date.MOD_NONE,Date.CAL_GREGORIAN,(44,7,1789,False),"Text comment") d.set(Date.QUAL_NONE,Date.MOD_NONE,Date.CAL_GREGORIAN,(44,7,1789,False),"Text comment")
dates.append( d) dates.append( d)
@ -450,7 +454,6 @@ class TestcaseGenerator:
ndate = None ndate = None
try: try:
datestr = _dd.display( dateval) datestr = _dd.display( dateval)
print datestr
try: try:
ndate = _dp.parse( datestr) ndate = _dp.parse( datestr)
if not ndate: if not ndate: