ZDebug 0.2 incompatible with Formulator 1.0
28 Jul
2001
28 Jul
'01
10:14 a.m.
Just analysed a strange exception during form validation with Formulator: Zope reported a "TypeError: expected 3, got 2 arguments" from "ZDebug.DTMLDebug.py:184". This is in the middle of a call to "dtmlexc", no function call around. It turned out that: The problem was the creation of the exception object. ZDebug assumes that exceptions accept a single string argument, but "FormValidationError" wants 2 arguments. Attached is a patch trying to work around the problem: It raises the exception in a "try ... except". When this raises the expected exception, then it is reraised; otherwise, the original exception is raised (which is not so good as the ZDebug Message but better than nothing). Dieter
9017
Age (days ago)
9017
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dieter Maurer