The execution and the exception always go together. If you are
opening a file, which does not exist, then if you did not handle this
situation properly, then your program is considered to be of bad
quality.
The program stops if an exception occurs. So exceptions are used to handle various type of errors, which may occur during a program execution and take appropriate action instead of halting program completely.
The program stops if an exception occurs. So exceptions are used to handle various type of errors, which may occur during a program execution and take appropriate action instead of halting program completely.