Object Oriented Programming20765 marksExceptional Handling
How can define catch statement that can catch any type of exception? Illustrate the use of multiple catch statement with example.
How can define catch statement that can catch any type of exception? Illustrate the use of multiple catch statement with example. [5]
To catch any type of exception regardless of its type, we use the ellipsis (...) inside the catch statement's parentheses. This acts as a catch-all handler and must be placed as the last catch block. Syntax: The catch(...) block will handle every exception that is thrown inside the corresponding ...