Hi !
Since we are speaking of this, where i can get a list of all python exceptions ?
If you look through dir(__builtins__) you'll see a bunch of the standard ones. It's easy to create new exceptions, so there's no complete list. Exception is the superclass of all exceptions, so if you catch it you catch all exceptions.
or do:
>>> import pprint >>> pprint.pprint([v for v in dir(__builtins__) if v.endswith('Error')]) ['ArithmeticError', 'AssertionError', 'AttributeError', 'EOFError', 'EnvironmentError', 'FloatingPointError', 'IOError', 'ImportError', 'IndentationError', 'IndexError', 'KeyError', 'LookupError', 'MemoryError', 'NameError', 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', 'StandardError', 'SyntaxError', 'SystemError', 'TabError', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'ValueError', 'ZeroDivisionError'] >>> help(ImportError) Help on class ImportError in module exceptions:
class ImportError(StandardError) | Import can't find module, or can't find name in module. | | Method resolution order: | ImportError | StandardError | Exception | | Methods inherited from Exception: | | __getitem__(...) | | __init__(...) | | __str__(...)
-- Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss