1.2.121. Caught Exceptions

This rule collects the exceptions used in catch clause. Those are the caught exceptions.

Caught exceptions might be thrown from within the code, or from an outside library.

<?php

try {
    foo();
} catch (MyException $e) {
    fixException();
} catch (MyOtherException1|MyOtherException2) {
    fixException();
} finally {
    clean();
}

?>

1.2.121.1. Specs

Short name

Exceptions/CaughtExceptions

Rulesets

All, Changed Behavior, Dump

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

catch

Available in

Entreprise Edition, Exakat Cloud