Exception Polyphormism

no-email (Damien Seguy), Damien Seguy
Sat, 23 Sep 2023 00:00:00 +0000

Custom exceptions are like any other classes: they may implements interfaces. Later, that interface may be used to catch the exception, even if the interface has nothing to do with exceptions. And with several interfaces on the same exception, it is possible to catch them in different ways.