[ZCM] [ZC] 1712/ 3 Wontfix "Inconsistent and sometimes incomprehensible error messages from bad dates"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Apr 5 09:11:48 EDT 2005


Issue #1712 Update (Wontfix) "Inconsistent and sometimes incomprehensible error messages from bad dates"
 Status Wontfix, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1712

==============================================================
= Wontfix - Entry #3 by ajung on Apr 5, 2005 9:11 am

 Status: Pending => Wontfix

The DateTime parser is supposed to raise DateError, TimeError, DateTimeError *and* SyntaxError as exception. So this SyntaxError
looks perfectly fine. I agree that four different exceptions are
somewhat insane and should be replaced with a unique DateError
exception but changing the code again might raise 3rd-party compatibility issue relying on a certain exception. So marking the issue as Won't_fix.
________________________________________
= Comment - Entry #2 by rjmunro on Feb 25, 2005 9:40 am

I got the version wrong, I was actually using version 2.7.1. Things are improved in 2.7.4, but it can give "SyntaxError" instead of "DateError" under some circumstances.
________________________________________
= Request - Entry #1 by rjmunro on Feb 25, 2005 8:54 am

x = DateTime("99/99/99")
gives the excepton:
"DateError: 99/99/99"
which makes perfect sense, but:
x = DateTime("null/null/null")
gives the exception:
"AttributeError: SyntaxError instance has no attribute 'replace'"
and
x = DateTime("null")
gives the exception:
"IndexError: string index out of range"
neither of which make any sense.
==============================================================



More information about the Zope-Collector-Monitor mailing list