Exception handlers must always be placed immediately after the try block and are identified by the catch statement. The last exception handler is the default exception handler. It will catch exceptions of any type not previously specified and must be coded after all other exception handlers. The exception handlers are mutually exclusive. You can never fall from one into another.
Processing comes together after the closing brace of the last exception handler.
This can be used for any common exception handler code. In this example, the exception counter is incremented in this common area. The first throw statement throws a string constant to be caught by an exception handler that catches a character array. The second throw statement throws an integer to be caught by an exception handler that catches an integer. If no exception is thrown, the function will end with the return statement.