o
    äe‚  ã                   @   s–   d dl mZmZ edƒ G dd„ deƒZG dd„ deƒZG dd„ deƒZG d	d
„ d
eƒZG dd„ deƒZ	G dd„ deƒZ
eZeƒ G dd„ deƒƒZdS )é    )ÚdocumentÚset_documentation_groupÚhelpersc                   @   ó   e Zd ZdZdS )ÚDuplicateBlockErrorzBRaised when a Blocks contains more than one Block with the same idN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úAD:\Projects\ConvertPro\env\Lib\site-packages\gradio/exceptions.pyr      ó    r   c                   @   r   )ÚTooManyRequestsErrorz;Raised when the Hugging Face API returns a 429 status code.Nr   r   r   r   r   r      r   r   c                   @   ó   e Zd ZdS )ÚInvalidApiNameErrorN©r   r	   r
   r   r   r   r   r      ó    r   c                   @   r   )ÚServerFailedToStartErrorNr   r   r   r   r   r      r   r   c                   @   r   )ÚInvalidBlockErrorzcRaised when an event in a Blocks contains a reference to a Block that is not in the original BlocksNr   r   r   r   r   r      r   r   c                   @   r   )ÚReloadErrorz?Raised when something goes wrong when reloading the gradio app.Nr   r   r   r   r   r       r   r   c                       s0   e Zd ZdZddef‡ fdd„Zdd„ Z‡  ZS )	ÚErrora  
    This class allows you to pass custom error messages to the user. You can do so by raising a gr.Error("custom message") anywhere in the code, and when that line is executed the custom message will appear in a modal on the demo.

    Demos: calculator
    úError raised.Úmessagec                    s   || _ tƒ  | j ¡ dS )za
        Parameters:
            message: The error message to be displayed to the user.
        N)r   ÚsuperÚ__init__)Úselfr   ©Ú	__class__r   r   r   1   s   zError.__init__c                 C   s
   t | jƒS )N)Úreprr   )r   r   r   r   Ú__str__9   s   
zError.__str__)r   )r   r	   r
   r   Ústrr   r    Ú__classcell__r   r   r   r   r   )   s    r   N)Zgradio_client.documentationr   r   Ú
ValueErrorr   Ú	Exceptionr   r   r   r   r   ZInvalidApiNamer   r   r   r   r   Ú<module>   s    