There are a number of standard exceptions are built into Python (and, therefore, Zope and DTML). Here they are: IOError - generated when an I/O operation fails; ImportError - generated when a module import fails; IndexError - generated when an attempt is made to access a non-existent element index; KeyError - generated when an attempt is made to access a non-existent dictionary key; MemoryError - generated when an out-of-memory error occurs; NameError - generated when an attempt is made to access a non-existent variable; SyntaxError - generated when the interpreter finds a syntax error; TypeError - generated when an attempt is made to run an operation on an incompatible object type; ZeroDivisionError - generated when an attempt is made to divide by zero. For a complete list, take a look at http://www.python.org/doc/current/lib/module-exceptions.html
blog comments powered by Disqus |