Exception is mainly an issue which may be anything which particularly stops the execution of the process. In normal terms “an error which interrupts the program or application which blocks its functionality”.
It is meant to be Handled;
As explained above it is to be handled on priority, because when an exception occurs the overall progress of the program gets terminated and it stops the result too. The occurrence of the exception is depends on the program which may be either at the run time or during the execution time.
Ever worried about “Why it occurs”
Exception is an abnormal condition, hence there is no certain reasons to note the occurrence of it, lemme share few situations here, if opening a file which is not present, memory error and many.
Here is the best thing”
As denoted above Exceptions are conditions within the code. Hence a developer can able to handle the exceptions and take necessary actions.
Difference between Exception and Error:
Exception: It occurs within the code which can be handled.
- Arithmetic Exception
- DivideByZero Exception
Error: It can’t be resolved by programmer. The reason here is lack of system resources
- JVM Error
- Hardware Error
How to handle Exception in Selenium
1. Software Testing Help - http://www.softwaretestinghelp.com/exception-handling-framework-selenium-tutorial-19/
2. Learn Automation –