On Wednesday 11 December 2002 03:43 am, Dmitry Vasiliev wrote:
> Casey Duncan wrote:
> > On Tuesday 10 December 2002 03:14 pm, Guido van Rossum wrote:
> >>>Can we get the same patch without the generic "except:", please?
> >>>the last thing I want is a database corruption caused by resizing the
> >>>Edit box...
> >>Why would this particular except clause cause database corruption?
> > I think Leonard is refering to catching ConflictErrors. However I don't
> > int() touches the database ;^).
> I saw "try: int() except:" pattern in many places through all the Zope
> code. I think catching ValueError only does the job, but then we should
> replace it in all the places. :-)
Nope, as Guido pointed out (and he should know ;^), Int can raise miriad
exceptions. not just ValueError.
IMO as long as the int is the *only* thing happening in the try block and you
comment the bare except, then we are ok. Changing the except clause will only
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -