[Zope-dev] Re: Bare "except" dangerous to ZODB? was Re:
[Zope-dev] Accept-Charset hearders causing 500 internal server
error.[correct but not lenient]
Leonardo Rochael Almeida
leo@hiper.com.br
10 Feb 2003 21:07:47 -0200
On Mon, 2003-02-10 at 20:46, Chris McDonough wrote:
> Could this be done by initializing a dictionary at startup keyed on
> thread-id that a ConflictError exception's __init__ could stick a marker
> into, then checking that dictionary at commit time and disallowing the
> commit if the marker still existed?
+1
And logging a zLOG.ERROR (or maybe even zLOG.PANIC?) level message to
that effect
IMHO, something that blocked commits of ConflictError'ed transactions
should be a requirement in Zope 2.7
I believe that unqualified "except:"'s are the most common cause of
unexplained Zope ZODB corruption.
--
Ideas don't stay in some minds very long because they don't like
solitary confinement.