�
J�g� � �Z � G d � de � � Z G d� de� � Z G d� de� � ZdS )c � � e Zd ZdS )�
FPDFExceptionN)�__name__�
__module__�__qualname__� � �[/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/fpdf/errors.pyr r s � � � � � ��Dr r c �0 � � e Zd ZdZd� fd� Zd� Zd� Z� xZS )�FPDFPageFormatExceptionz/Error is thrown when a bad page format is givenFc � �� t � � � � � |r|rt d� � �|| _ || _ || _ d S )Nz\FPDF Page Format Exception cannot be both for unknown type and for wrong number of arguments)�super�__init__� TypeError�argument�unknown�one)�selfr r r � __class__s �r r z FPDFPageFormatException.__init__ s[ �� �
��������� �s� ��A�� �
� !��
��������r c �P � | j j � d| j �d| j �d| j �d�S )N�(z, �))r r r r r �r s r �__repr__z FPDFPageFormatException.__repr__ sT � ��~�&�
C�
C��
�
C�
C�#'�<�
C�
C�59�X�
C�
C�
C�
r c �| � | j rd| j � �}n| j rd| j � d�}n| j }| j j � d|� �S )NzUnknown page format: zOnly one argument given: z. Need (height,width)z: )r r r r r )r �ress r �__str__zFPDFPageFormatException.__str__ s[ � ��<� �9�$�-�9�9�C�C�
�X� �R�d�m�R�R�R�C�C��-�C��.�)�3�3�c�3�3�3r )FF�r r r �__doc__r r r �
__classcell__�r s @r r r sa �� � � � � �9�9� � � � � � �
�
�
�4� 4� 4� 4� 4� 4� 4r r c �. � � e Zd ZdZ� fd�Zd� Zd� Z� xZS )�FPDFUnicodeEncodingExceptionzYError is thrown when a character that cannot be encoded by the chosen encoder is providedc �r �� t � � � � � || _ || _ || _ d S )N)r
r �
text_index� character� font_name)r r$ r% r&