7198, 7212: attach invalid date to DateError

Back-port [872bf57] from gramps40
This commit is contained in:
Vassilii Khachaturov 2013-11-23 20:26:46 +02:00
parent d96b01318a
commit a00b413906

View File

@ -1647,9 +1647,10 @@ class Date(object):
raise DateError("Invalid year {0} passed in value {1}".
format(original, value))
except DateError:
except DateError as e:
log.debug("Sanity check failed - self: {0}, sanity: {1}".format(
self.dateval, sanity.dateval))
e.date = self
raise
def recalc_sort_value(self):