o
    g                     @   s   G d d de ZG dd deZG dd deZG dd deZG dd	 d	eZG d
d deeZG dd deeZ	G dd dee
ZdS )c                   @   s$   e Zd ZdZdd Zedd ZdS )PyAsn1ErroraB  Base pyasn1 exception

    `PyAsn1Error` is the base exception class (based on
    :class:`Exception`) that represents all possible ASN.1 related
    errors.

    Parameters
    ----------
    args:
        Opaque positional parameters

    Keyword Args
    ------------
    kwargs:
        Opaque keyword parameters

    c                 O   s   || _ || _d S N)_args_kwargs)selfargskwargs r   C/var/www/visachat/venv/lib/python3.10/site-packages/pyasn1/error.py__init__   s   
zPyAsn1Error.__init__c                 C   s   | j di S )a7  Return exception context

        When exception object is created, the caller can supply some opaque
        context for the upper layers to better understand the cause of the
        exception.

        Returns
        -------
        : :py:class:`dict`
            Dict holding context specific data
        context)r   get)r   r   r   r	   r      s   zPyAsn1Error.contextN)__name__
__module____qualname____doc__r
   propertyr   r   r   r   r	   r   	   s
    r   c                   @      e Zd ZdZdS )ValueConstraintErrora  ASN.1 type constraints violation exception

    The `ValueConstraintError` exception indicates an ASN.1 value
    constraint violation.

    It might happen on value object instantiation (for scalar types) or on
    serialization (for constructed types).
    Nr   r   r   r   r   r   r   r	   r   /       r   c                   @   r   )SubstrateUnderrunErrorzASN.1 data structure deserialization error

    The `SubstrateUnderrunError` exception indicates insufficient serialised
    data on input of a de-serialization codec.
    Nr   r   r   r   r	   r   :   r   r   c                   @   r   )EndOfStreamErrorzASN.1 data structure deserialization error

    The `EndOfStreamError` exception indicates the condition of the input
    stream has been closed.
    Nr   r   r   r   r	   r   B   r   r   c                   @   r   )UnsupportedSubstrateErrorz2Unsupported substrate type to parse as ASN.1 data.Nr   r   r   r   r	   r   J   r   r   c                   @   s   e Zd ZdZdddZdS )PyAsn1UnicodeErrora.  Unicode text processing error

    The `PyAsn1UnicodeError` exception is a base class for errors relating to
    unicode text de/serialization.

    Apart from inheriting from :class:`PyAsn1Error`, it also inherits from
    :class:`UnicodeError` to help the caller catching unicode-related errors.
    Nc                 C   s.   t |trtj| g|jR   t| | d S r   )
isinstanceUnicodeErrorr
   r   r   )r   messageunicode_errorr   r   r	   r
   W   s   
zPyAsn1UnicodeError.__init__r   )r   r   r   r   r
   r   r   r   r	   r   N   s    r   c                   @   r   )PyAsn1UnicodeDecodeErrora/  Unicode text decoding error

    The `PyAsn1UnicodeDecodeError` exception represents a failure to
    deserialize unicode text.

    Apart from inheriting from :class:`PyAsn1UnicodeError`, it also inherits
    from :class:`UnicodeDecodeError` to help the caller catching unicode-related
    errors.
    Nr   r   r   r   r	   r   ]   r   r   c                   @   r   )PyAsn1UnicodeEncodeErrora-  Unicode text encoding error

    The `PyAsn1UnicodeEncodeError` exception represents a failure to
    serialize unicode text.

    Apart from inheriting from :class:`PyAsn1UnicodeError`, it also inherits
    from :class:`UnicodeEncodeError` to help the caller catching
    unicode-related errors.
    Nr   r   r   r   r	   r   i   r   r   N)	Exceptionr   r   r   r   r   r   r   UnicodeDecodeErrorr   UnicodeEncodeErrorr   r   r   r   r	   <module>   s   &