• Home
  • Raw
  • Download

Lines Matching full:exception

7    :synopsis: Standard exception classes.
20 clause that mentions a particular class, that clause also handles any exception
21 classes derived from that class (but not exception classes from which *it* is
22 derived). Two exception classes that are not related via subclassing are never
32 :keyword:`raise` statement. If the exception class is derived from the standard
34 exception instance's :attr:`args` attribute.
36 User code can raise built-in exceptions. This can be used to test an exception
38 interpreter raises the same exception; but beware that there is nothing to
41 The built-in exception classes can be subclassed to define new exceptions;
42 programmers are encouraged to derive new exceptions from the :exc:`Exception`
49 .. exception:: BaseException
52 inherited by user-defined classes (for that, use :exc:`Exception`). If
61 The tuple of arguments given to the exception constructor. Some built-in
67 .. exception:: Exception
76 .. exception:: StandardError
80 :exc:`StandardError` itself is derived from :exc:`Exception`.
83 .. exception:: ArithmeticError
90 .. exception:: BufferError
96 .. exception:: LookupError
103 .. exception:: EnvironmentError
114 When an :exc:`EnvironmentError` exception is instantiated with a 3-tuple, the
120 The :attr:`filename` attribute is ``None`` when this exception is created with
129 .. exception:: AssertionError
136 .. exception:: AttributeError
143 .. exception:: EOFError
151 .. exception:: FloatingPointError
153 Raised when a floating point operation fails. This exception is always defined,
159 .. exception:: GeneratorExit
170 .. exception:: IOError
177 for more information on exception instance attributes.
183 .. exception:: ImportError
189 .. exception:: IndexError
198 .. exception:: KeyError
205 .. exception:: KeyboardInterrupt
210 waiting for input also raise this exception. The exception inherits from
212 :exc:`Exception` and thus prevent the interpreter from exiting.
218 .. exception:: MemoryError
225 nevertheless raises an exception so that a stack traceback can be printed, in
229 .. exception:: NameError
236 .. exception:: NotImplementedError
238 This exception is derived from :exc:`RuntimeError`. In user defined base
239 classes, abstract methods should raise this exception when they require derived
245 .. exception:: OSError
249 This exception is derived from :exc:`EnvironmentError`. It is raised when a
258 :func:`unlink`), the exception instance will contain a third attribute,
264 .. exception:: OverflowError
270 of floating point exception handling in C, most floating point operations
274 .. exception:: ReferenceError
276 This exception is raised when a weak reference proxy, created by the
282 Previously known as the :exc:`weakref.ReferenceError` exception.
285 .. exception:: RuntimeError
292 .. exception:: StopIteration
295 there are no further values. This is derived from :exc:`Exception` rather
302 .. exception:: SyntaxError
311 of the exception instance returns only the message.
314 .. exception:: IndentationError
320 .. exception:: TabError
326 .. exception:: SystemError
335 message (the exception's associated value) and if possible the source of the
339 .. exception:: SystemExit
341 This exception is raised by the :func:`sys.exit` function. When it is not
349 status or error message (defaulting to ``None``). Also, this exception derives
353 A call to :func:`sys.exit` is translated into an exception so that clean-up
360 The exception inherits from :exc:`BaseException` instead of :exc:`StandardError`
361 or :exc:`Exception` so that it is not accidentally caught by code that catches
362 :exc:`Exception`. This allows the exception to properly propagate up and cause
369 .. exception:: TypeError
375 .. exception:: UnboundLocalError
384 .. exception:: UnicodeError
416 .. exception:: UnicodeEncodeError
424 .. exception:: UnicodeDecodeError
432 .. exception:: UnicodeTranslateError
440 .. exception:: ValueError
444 more precise exception such as :exc:`IndexError`.
447 .. exception:: VMSError
452 .. exception:: WindowsError
467 .. exception:: ZeroDivisionError
477 .. exception:: Warning
482 .. exception:: UserWarning
487 .. exception:: DeprecationWarning
492 .. exception:: PendingDeprecationWarning
497 .. exception:: SyntaxWarning
502 .. exception:: RuntimeWarning
507 .. exception:: FutureWarning
513 .. exception:: ImportWarning
520 .. exception:: UnicodeWarning
527 Exception hierarchy