Exception Handling Flashcards
SyntaxError
Raised when thereβs an error in syntax of the python code
ValueError
Raised when a built in method or operation receives an argument that has the right data type but mismatched or inappropriate values
IOError
Raised when the file specified in the program cannot be opened
KeyboardInterrupt
Raised when the user accidentally hits the delete or esc key while executing the program due to which normal flow of the program is interrupted
ImportError
Raised when the requested module definition is not found
EOFError
Raised when the end of file condition is reached without reading any data by input()
ZeroDivsionError
Raised when denominator in a division operation is zero
IndexError
Raised when the index in a sequence is out of range
NameError
Raised when a local or global variable name is not defined
IndentationError
Raised due to incorrect indentation in the program code
TypeError
Raised when an operator is supplied with a value of incorrect data type
OverFlowError
Raised when the result of a calculation exceeds the maximum limit for numeric data type