I'm trying to turn MySQLi query errors to Exceptions, but couldn't - mysqli_sql_exception is thrown only if it failed to connect the DB.
I used mysqli_report(MYSQLI_REPORT_STRICT) and procedural MySQLi functions embedded to custom wrapper class.
Former code:
$result = mysqli_query($DBlink, $SQL);
if($result === false) {
throw new MySQLiQueryException($SQL, mysqli_error($DBlink), mysqli_errno($DBlink));
}
Question: Is it normal no Warning, nor Exception are thrown when query fails so I have to check if mysqli_query() returned false?
try, catch, throw