
    Dho              	           d Z ddlmZ dej                  e   dej
                  dej
                  dej                  d   fdZdej
                  dej
                  dej
                  fd	Zy
)a@  
This module provides utility functions for raising and reraising exceptions.

Functions:
    raise_exception(exception_class, *args, **kwargs):
        Returns a function that raises an exception of the given type with
        the given arguments.

    reraise(*args, **kwargs):
        Reraises the current exception.
   )typesexception_classargskwargsreturn).Nc                 |     dt         j                  dt         j                  dt         j                  f fd}|S )z
    Returns a function that raises an exception of the given type with the
    given arguments.

    >>> raise_exception(ValueError, 'spam')('eggs')
    Traceback (most recent call last):
        ...
    ValueError: spam
    args_kwargs_r   c                       i )N )r	   r
   r   r   r   s     y/var/www/fastuser/data/www/generator.snapmosaic.io/flask_app/venv/lib/python3.12/site-packages/python_utils/exceptions.pyraise_zraise_exception.<locals>.raise_   s    t.v..    )r   Any)r   r   r   r   s   ``` r   raise_exceptionr      s0    /uyy /UYY /599 / Mr   c                        )z
    Reraises the current exception.

    This function seems useless, but it can be useful when you need to pass
    a callable to another function that raises an exception.
    r   )r   r   s     r   reraiser   %   s     
r   N)	__doc__ r   Type	Exceptionr   Callabler   r   r   r   r   <module>r      sx   
 ZZ	*99 ii ^^I	*
599 
		 
eii 
r   