I can enable PDO to throw error as exceptions to PDOException class. Can I make it to throw it to my exception class? Right now I have to code like this:
try {
$sql = "query";
$zap = $pdo->query($sql);
$sql_d=array();
if ($zap->execute($sql_d)) {
}
} catch (\PDOException $e) {
throw new dbException($zap->errorInfo(), $sql);
}
I want to PDO throw error to dbException class - not PDOException.