1.2.124. Caught Expressions¶
This rule lists all the caught exceptions.
Exceptions may be caught by a code, while the same code never throw them.
<?php
// This analyzer reports MyException and Exception
try {
doSomething();
} catch (MyException $e) {
fixIt();
} catch (\Exception $e) {
fixIt();
}
?>
See also Exceptions.
1.2.124.1. Connex PHP features¶
1.2.124.1.1. Specs¶
Short name |
Php/TryCatchUsage |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |