Error Handling increase the flexibility of the program without getting to exit abruptly . Handling exception at runtime is very important . Lets check out with few examples .
If you don’t know the type of exceptions that a code block can possibly raise, you can use Exception which catches all exceptions. In addition, you can have multiple except statements.
Try except can also be used outside the scope :
The finally clause in the try block is a optional to catch any exception which you have missed , which will automatically fall in the finally block .
So here are the few example of handling exception .