o
    Siu                     @   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   | )zRe-raise the given exception.

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

    Raises:
        The input exception.
     exnr   r   G/home/ubuntu/.local/lib/python3.10/site-packages/webdataset/handlers.pyreraise_exception      	r   c                 C      dS )zIgnore 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 )zIssue 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   )zIgnore 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
   )zIssue 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   