1.2.180. Collect Methods Throwing Exceptions

This is a list of all the methods and functions that throw exception.

This rule reports explicit throw’s, and doesn’t list exceptions passing through : for example, when the exception is thrown in a sub-call, but not caught yet.

<?php

function foo($a) {
     if ($a % 2) {
             throw new Exception('This is not an even number');
     }
}

?>

1.2.180.1. Specs

Short name

Dump/CollectMethodsThrowingExceptions

Rulesets

All, Dump

Exakat since

2.5.3

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Medium

Available in

Entreprise Edition, Exakat Cloud