Q:

How to check if included file from a loop comes with errors

I have this kind of loop.  On each iteration it should include a file, Included files can come with errors.  Once some of included files gets an error the whole process of getting lost.  How to prevent breaking of the process? 
I tried this try catch but it errors from included files still cause stopping execution of file. 
Thanks
foreach ($li_arrays as $index => $li_array) {
    if($index == 0){

        try {
            require 'update.php';
        } catch(Exception $e) {
            echo "Exception caught with message: " .  $e->getMessage() . " \n";
        }

    }
    elseif ($index == 1){
        try {
            require 'update1.php';
        } catch(Exception $e) {
            echo "Exception caught with message: " .  $e->getMessage() . " \n";
        }
    }else{
        try {
            require 'update2.php';
        } catch(Exception $e) {
            echo "Exception caught with message: " .  $e->getMessage() . " \n";
        }
    }

A:

At the end I changed "require" with "include" and used this try-catch approach inside each included file. 
$attempts = 0;

    do {
        try
        {
           ////PHP code ///
        } catch (Exception $e) {
            echo "\n\n======EXCEPTION======\n\n";
            var_dump($e);
            $attempts++;
            sleep(30);
            continue;
        }
        break;
    } while($attempts < 5);

