2076 9

CSC166 ยท 2076 ยท 5 marks

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]

Object Oriented ProgrammingChapter 7: Function Templates and Exception HandlingExceptional Handling

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 ...