
    l0j                        d dl mZmZ  ed            G d de          Z G d de          Z G d de          Z G d	 d
e          Z G d de          Z	 G d de          Z
eZ e             G 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__     T/home/wildlama/miniconda3/envs/lam/lib/python3.11/site-packages/gradio/exceptions.pyr   r      s        LLDr   r   c                       e Zd ZdZdS )TooManyRequestsErrorz;Raised when the Hugging Face API returns a 429 status code.Nr   r   r   r   r   r      s        EEDr   r   c                       e Zd ZdS )InvalidApiNameErrorNr	   r
   r   r   r   r   r   r              Dr   r   c                       e Zd ZdS )ServerFailedToStartErrorNr   r   r   r   r   r      r   r   r   c                       e Zd ZdZdS )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      s        mmDr   r   c                       e Zd ZdZdS )ReloadErrorz?Raised when something goes wrong when reloading the gradio app.Nr   r   r   r   r   r       s        IIDr   r   c                   0     e Zd ZdZddef fdZd Z x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                 b    || _         t                                          | j                    dS )za
        Parameters:
            message: The error message to be displayed to the user.
        N)r   super__init__)selfr   	__class__s     r   r"   zError.__init__1   s,    
 &&&&&r   c                 *    t          | j                  S )N)reprr   )r#   s    r   __str__zError.__str__9   s    DL!!!r   )r   )r	   r
   r   r   strr"   r'   __classcell__)r$   s   @r   r   r   )   sb         ' ' ' ' ' ' ' '" " " " " " "r   r   N)gradio_client.documentationr   r   
ValueErrorr   	Exceptionr   r   r   r   r   InvalidApiNamer   r   r   r   <module>r.      sw   I I I I I I I I  	 " " "	 	 	 	 	* 	 	 		 	 	 	 	9 	 	 		 	 	 	 	* 	 	 		 	 	 	 	y 	 	 		 	 	 	 	
 	 	 		 	 	 	 	* 	 	 	 % 
" " " " "I " " " " "r   