Skip to content

Tag Archives: Python-exceptions

EOF stands for End Of File. Well, technically it is not an error, rather an exception. This exception is raised when one of the built-in… Read More
EOFError is raised when one of the built-in functions input() or raw_input() hits an end-of-file condition (EOF) without reading any data. This error is sometimes… Read More
An Exception is an Event, which occurs during the execution of the program. It is also known as a run time error. When that error… Read More
An exception is something that interrupts the flow of the program. These exceptions stop the process running and sends out an error message. Exceptions can… Read More
To log an exception in Python we can use logging module and through that we can log the error. Logging module provides a set of… Read More
EnvironmentError is the base class for errors that come from outside of Python (the operating system, file system, etc.). It is the parent class for… Read More
Prerequisites: Python Exception Handling There are several standard exceptions in Python and NameError is one among them. NameError is raised when the identifier being accessed… Read More
The unittest unit testing framework is used to validate that the code performs as designed. To achieve this, unittest supports some important methods in an… Read More
Before Printing the Error Hierarchy let’s understand what an Exception really is? Exceptions occur even if our code is syntactically correct, however, while executing they… Read More
TypeError is one among the several standard Python exceptions. TypeError is raised whenever an operation is performed on an incorrect/unsupported object type. For example, using… Read More
Let us see how to handle OSError Exceptions in Python. OSError is a built-in exception in Python and serves as the error class for the… Read More
Prerequisite: Python Traceback To print stack trace for an exception the suspicious code will be kept in the try block and except block will be… Read More
Errors are the problems in a program due to which the program will stop the execution. On the other hand, exceptions are raised when the… Read More
There might arise a situation where there is a need for additional information from an exception raised by Python. Python has two types of exceptions… Read More
In Python, A traceback is a report containing the function calls made in your code at a specific point i.e when you get an error… Read More