[Zope-DB] Checking for exceptions

Charlie Clark charlie at begeistert.org
Wed Oct 8 14:23:57 EDT 2003


Dear list,

probably a stupid question but I couldn't think of the answer quickly.

How do I write the following so that it works with an IntegrityError 
generated from the database:

try:
      mySQL_method(paras....)
except: IntegrityError
      return context.nice_error_page()

Charlie




More information about the Zope-DB mailing list