o
    wÖiu  ã                   @   s@   d Z ddlZddlZdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ ZdS )aJ  Pluggable exception handlers.

These are functions that take an exception as an argument and then return...

- the exception (in order to re-raise it)
- True (in order to continue and ignore the exception)
- False (in order to ignore the exception and stop processing)

They are used as handler= arguments in much of the library.
é    Nc                 C   s   | ‚)zƒRe-raise the given exception.

    Args:
        exn: The exception to be re-raised.

    Raises:
        The input exception.
    © ©Úexnr   r   úP/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/webdataset/handlers.pyÚreraise_exception   ó   	r   c                 C   ó   dS )z±Ignore the exception and continue processing.

    Args:
        exn: The exception to be ignored.

    Returns:
        bool: Always returns True to indicate continuation.
    Tr   r   r   r   r   Úignore_and_continue"   r   r	   c                 C   ó   t  t| ƒ¡ t d¡ dS )zÃIssue a warning for the exception and continue processing.

    Args:
        exn: The exception to be warned about.

    Returns:
        bool: Always returns True to indicate continuation.
    ç      à?T©ÚwarningsÚwarnÚreprÚtimeÚsleepr   r   r   r   Úwarn_and_continue.   ó   	
r   c                 C   r   )z²Ignore the exception and stop further processing.

    Args:
        exn: The exception to be ignored.

    Returns:
        bool: Always returns False to indicate stopping.
    Fr   r   r   r   r   Úignore_and_stop?   r   r   c                 C   r
   )zÄIssue a warning for the exception and stop further processing.

    Args:
        exn: The exception to be warned about.

    Returns:
        bool: Always returns False to indicate stopping.
    r   Fr   r   r   r   r   Úwarn_and_stopK   r   r   )Ú__doc__r   r   r   r	   r   r   r   r   r   r   r   Ú<module>   s   