Ë
    ™·Ki  ã                   óJ   — d Z  G d„ de«      Z G d„ de«      Z G d„ de«      Zy)z&Exceptions for the Django hook system.c                   ó   — e Zd ZdZy)ÚHookSystemErrorz*Base exception for hook system operations.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úh/home/cursorai/projects/django-wallet-utils/venv/lib/python3.12/site-packages/django_hooks/exceptions.pyr   r      s   „ Ù4àr	   r   c                   ó:   ‡ — e Zd ZdZ	 ddedededz  fˆ fd„Zˆ xZS )ÚHookRejectionErrora"  
    Raised by PRE hooks to reject an operation.

    This exception allows PRE hooks to reject an operation before it executes,
    providing a machine-readable error code and human-readable message for
    frontend display.

    Attributes:
        error_code: Machine-readable error code in ALL_CAPS format (e.g., 'DAILY_LIMIT_EXCEEDED')
        message: Human-readable error message for display
        details: Optional dictionary with additional context for error handling

    Example:
        raise HookRejectionError(
            error_code="DAILY_LIMIT_EXCEEDED",
            message="You have exceeded your daily transaction limit of $500",
            details={
                "limit": 500,
                "current_total": 650,
                "remaining": 0,
            }
        )
    NÚ
error_codeÚmessageÚdetailsc                 óV   •— t         ‰| �  |«       || _        || _        |xs i | _        y ©N)ÚsuperÚ__init__r   r   r   )Úselfr   r   r   Ú	__class__s       €r
   r   zHookRejectionError.__init__#   s+   ø€ ô 	‰Ñ˜Ô!Ø$ˆŒØˆŒØ’} "ˆ�r	   r   )r   r   r   r   ÚstrÚdictr   Ú__classcell__©r   s   @r
   r   r   
   s7   ø„ ñð8  $ñ		%àð	%ð ð	%ð ˜‘÷		%ñ 	%r	   r   c                   ó0   ‡ — e Zd ZdZdededefˆ fd„Zˆ xZS )ÚHookExecutionErrora†  
    Raised when a hook fails to execute due to an internal error.

    This is different from HookRejectionError - it represents a bug or system
    failure in the hook itself, not a business rule rejection.

    Attributes:
        message: Error description
        hook_name: Name of the hook that failed
        original_exception: The underlying exception that caused the failure
    r   Ú	hook_nameÚoriginal_exceptionc                 ó@   •— t         ‰| �  |«       || _        || _        y r   )r   r   r   r   )r   r   r   r   r   s       €r
   r   zHookExecutionError.__init__<   s   ø€ Ü‰Ñ˜Ô!Ø"ˆŒØ"4ˆÕr	   )r   r   r   r   r   Ú	Exceptionr   r   r   s   @r
   r   r   /   s'   ø„ ñ
ð5 ð 5°ð 5È÷ 5ñ 5r	   r   N)r   r   r   r   r   r   r	   r
   Ú<module>r       s-   ðÙ ,ô	�iô 	ô"%˜ô "%ôJ5˜õ 5r	   