protected function isInList($list, Exception $exception)
    {
        // check if we actually have a list and its an array
        if ($list && is_array($list)) {
            // if we do lets loop through and check if our exception matches any of the classes
            foreach ($list as $type) {
                if ($exception instanceof $type) {
                    // if we match return true
                    return true;
                }
            }
        }

        // we got to the end there must be no match
        return false;
    }
protected function isInList($list, Exception $exception)
    {
        // check if we actually have a list and its an array
        if ($list && is_array($list)) {
            // if we do lets loop through and check if our exception matches any of the classes
            foreach ($list as $type) {
                if ($exception instanceof $type) {
                    // if we match return true
                    return true;
                }
            }
        }

        // we got to the end there must be no match
        return false;
    }
protected function isInList ( $ list , Exception $ exception ) { // check if we actually have a list and its an array if ( $ list && is_array ( $ list ) ) { // if we do lets loop through and check if our exception matches any of the classes foreach ( $ list as $ type ) { if ( $ exception instanceof $ type ) { // if we match return true return true ; } } } // we got to the end there must be no match return false ; }
check if a given exception matches the class of any in the list

@param $list
@param Exception $exception
@return bool
check if a given exception matches the class of any in the list