There is such code:
<?php class customException extends Exception{} $a; try{ if(!isset($a)){ $thrower = new customException("Variable not initialize"); throw $thrower; } echo $a."\n"; } catch(Exception $e){ echo $e->getMessage()."\n"; } var_dump($thrower instanceof Exception); ?> And it will work! Only I do not understand why? After all, we "threw" an exception to the customException class, why then is it compatible with the Exception class?