Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exception index
#1
as i rewrite a lot of stuff into python, i want to include many functions and make a lot of error handling raise exceptions.  i have not seen this, yet,  i would like a list or index of the entire exception hierarchy.  anyone know where to find such a thing?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
maybe start with https://docs.python.org/2/library/except...exceptions
the hierarchy is at the bottom of the page.
Reply
#3
>>> for entry in dir(__builtins__):
...     if 'error' in entry.lower():
...         print(entry)
Output:
ArithmeticError AssertionError AttributeError BlockingIOError BrokenPipeError BufferError ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError EOFError EnvironmentError FileExistsError FileNotFoundError FloatingPointError IOError ImportError IndentationError IndexError InterruptedError IsADirectoryError KeyError LookupError MemoryError NameError NotADirectoryError NotImplementedError OSError OverflowError PermissionError ProcessLookupError RecursionError ReferenceError RuntimeError SyntaxError SystemError TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError ValueError ZeroDivisionError
Hm! You are asking a different question. Sorry!
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  During handling of the above exception, another exception occurred Skaperen 7 26,864 Dec-21-2018, 10:58 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020