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.
Ex:
- Arithmetic Exception
- DivideByZero Exception
- NullPointerException
Error: It can’t be resolved by
programmer. The reason here is lack of system resources
Ex:
- JVM Error
- Hardware Error
Next Article:
How to handle Exception in Selenium
Resources:
1. Software Testing Help - http://www.softwaretestinghelp.com/exception-handling-framework-selenium-tutorial-19/
Thanks for sharing this. You can also refer your audience to https://selenium-vinod.blogspot.in/2016/04/selenium-webdriver.html
ReplyDelete