18.7 RE-THROWING AN EXCEPTION

Exceptions are caught in a catch clause and processed. Sometimes the catch clause may decide to re-throw this exception. It is allowed if we use third form of throw statement, i.e. throw without any exception specified. The re-thrown exception is not passed to any of the catch clause at that level. It is now passed on to the catch clause at the outer level (if one exists).

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.