MySQL Stored Procedure not throwing error if it contains a query that succeeds
Wow, that's a relevant problem, because you can't identify an error in a procedure, an this passes hidden next to some valid result! I think your question should be more popular.

After many tries and tests I found a way to solve it. You'd expect to loop through the procedure result set, until no more results are available (the PHP Manual way). However, I found an alternate control flow to catch the errors after previous valid results:

&lt;?php
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
try {
    $sql="CALL procedureWithErrors()";      
    $conn=new mysqli($host,$user,$pass,$db);

    /*The usual way (does not work)*/
    $conn-&gt;multi_query($sql);
    do{
        $result=$conn-&gt;store_result();      
        if($result){
            while($row=$result-&gt;fetch_assoc()){
                print_r($row);
            }
            $result-&gt;free();
        }                           
    }while($conn-&gt;more_results() &amp;&amp; $conn-&gt;next_result());

    /*This way works*/
    $conn-&gt;multi_query($sql);
    while(($result=$conn-&gt;store_result())!==FALSE){
        if($result){
            while($row=$result-&gt;fetch_assoc()){
                print_r($row);
            }
            $result-&gt;free();
        }                           
        $conn-&gt;next_result();
    }

    /*Just closing and error handling, not relevant code from here*/
    $conn-&gt;close();         

}catch(mysqli_sql_exception | Exception $e){    
    $error="Error #".$e-&gt;getCode()." ".$e-&gt;getMessage().PHP_EOL;    
    if(isset($conn) &amp;&amp; get_class($e)=="mysqli_sql_exception")
        $error.="SQLSTATE #".$conn-&gt;sqlstate." Statement: $sql".PHP_EOL;
    $error.=$e-&gt;getTraceAsString();
    echo(nl2br($error));    
}finally{
    if(isset($result) &amp;&amp; $result instanceof mysql_result) $result-&gt;free();          
    if(isset($conn) &amp;&amp; is_resource($conn) &amp;&amp; get_resource_type($conn)==='mysql link') $conn-&gt;close();
}
?&gt;


The problems seems to be that mysqli::more_results and mysql::next_result return FALSE if an error happens, so they can't distinguish between an error and the lack of further results.