Working on exception handling :

imaginor-labs 15 June 19
Technology Comments

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 :


Try-finally :
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 .

Happy learning and sharing !!


Add a Comment:

Recent Posts: