1.2.431. Exception Order¶
<?php
class A extends \Exception {}
class B extends A {}
try {
throw new A();
}
catch(A $a1) { }
catch(B $b2 ) {
// Never reached, as previous Catch is catching the early worm
}
?>
1.2.431.1. Suggestions¶
Remove one of the catch clause
1.2.431.2. Specs¶
Short name |
Exceptions/AlreadyCaught |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Features |
exception |
Examples |
|
Available in |