ezSQL_pdo::catch_error PHP Method

catch_error() public method

******************************************************************** Hooks into PDO error system and reports it to user
public catch_error ( )
    function catch_error()
    {
        $error_str = 'No error info';
        $err_array = $this->dbh->errorInfo();
        // Note: Ignoring error - bind or column index out of range
        if (isset($err_array[1]) && $err_array[1] != 25) {
            $error_str = '';
            foreach ($err_array as $entry) {
                $error_str .= $entry . ', ';
            }
            $error_str = substr($error_str, 0, -2);
            $this->register_error($error_str);
            $this->show_errors ? trigger_error($error_str . ' ' . $this->last_query, E_USER_WARNING) : null;
            return true;
        }
    }