
    }f                     Z     G d  de           Z G d de          Z G d de          ZdS )c                       e Zd ZdS )FPDFExceptionN)__name__
__module____qualname__     D/var/www/rtfcompare/venv/lib/python3.11/site-packages/fpdf/errors.pyr   r      s        Dr   r   c                   0     e Zd ZdZd fd	Zd Zd Z xZS )FPDFPageFormatExceptionz/Error is thrown when a bad page format is givenFc                     t                                                       |r|rt          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59XC C C	
r   c                 |    | j         rd| j         }n| j        rd| j         d}n| j        }| j        j         d| S )NzUnknown page format: zOnly one argument given: z. Need (height,width)z: )r   r   r   r   r   )r   ress     r	   __str__zFPDFPageFormatException.__str__   s[    < 	 9$-99CCX 	 RdmRRRCC-C.)33c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 Zd ZdZ fdZd Zd Z xZS )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&   r   s       r	   r   z%FPDFUnicodeEncodingException.__init__&   s2    $""r   c                     | j         j         dt          | j                  t          | j                  t          | j                  f dS )Nr   r   )r   r   reprr$   r%   r&   r   s    r	   r   z%FPDFUnicodeEncodingException.__repr__,   sF    .)ppD,A,A4CWCWY]^b^lYmYm+nppppr   c                 8    d| j          d| j         d| j         dS )NzCharacter "z" at index zI in text is outside the range of characters supported by the font used: "z(". Please consider using a Unicode font.)r%   r$   r&   r   s    r	   r   z$FPDFUnicodeEncodingException.__str__/   s<    5$. 5 5T_ 5 5-1^5 5 5	
r   r   r    s   @r	   r"   r"   #   s_        cc# # # # #q q q
 
 
 
 
 
 
r   r"   N)	Exceptionr   r   r"   r   r   r	   <module>r+      s   	 	 	 	 	I 	 	 	4 4 4 4 4m 4 4 4<
 
 
 
 
= 
 
 
 
 
r   