Exception Handling
Exception Handling
Types of Errors
• We can broadly classify errors into two categories - Syntax Error and Exception
Errors.
• Syntax Errors → This occurs when there is a wrong syntax in our code.
• Exception Errors →
• When there is no syntax error in our code and our code gets executed but some error
occurs during the execution, then this type of error is called Exception Error.
• When PVM cannot execute the byte code, it flags runtime error.
• For example,
• dividing a number with 0 is also an exception error, etc.
• Insufficient memory to store something
A Python Program to Understand the
effect of an Exception