[Zope-dev] Suggestion for better Zope error response

Skip Montanaro skip@mojam.com (Skip Montanaro)
Mon, 25 Sep 2000 13:52:19 -0500 (CDT)


Suppose you have a simple form like:

    <html>
    <form action="http://www.musi-cal.com/search" method="post">
    City: <input name="performers" type="text">
    Radius: <input name="radius:int" type="text">
    <input type="submit" name="submit" value="Search">
    </form>
    </html>

and the user submits the form with an invalid input for the radius.
Assuming ZServer was not run with -D, other than the standard boilerplate,
all the user sees is

    exceptions.ValueError

However, field2int raised ValueError with a string like

    ValueError: An integer was expected in the value 'wer'

Making this available to the user, even in the non-debug case, seems like it
would be useful feedback for the user that could help guide them to their
mistake.

-- 
Skip Montanaro (skip@mojam.com)
http://www.mojam.com/
http://www.musi-cal.com/