HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/jsons/__pycache__/exceptions.cpython-37.pyc
B

�P�e�@s�dZddlmZddlmZGdd�de�ZGdd�de�ZGdd	�d	ee�Z	Gd
d�de�Z
Gdd
�d
e�ZGdd�de
e�ZGdd�de
e	�Z
Gdd�de
e	�ZGdd�de
�ZGdd�de�ZdS)z3
Contains the classes that may be raised by jsons.
�)�JSONDecodeError)�Optionalc@s*eZdZdZed�dd�Zedd��ZdS)�
JsonsErrorz,
    Base class for all `jsons` errors.
    )�messagecCst�||�||_dS)zZ
        Constructor.
        :param message: the message describing the problem.
        N)�	Exception�__init__�_message)�selfr�r
�A/opt/alt/python37/lib/python3.7/site-packages/jsons/exceptions.pyr
szJsonsError.__init__cCs|jS)N)r)r	r
r
rrszJsonsError.messageN)�__name__�
__module__�__qualname__�__doc__�strr�propertyrr
r
r
rrsrc@seZdZdZdS)�ValidationErrorz9
    Raised when the validation of an object failed.
    N)rr
rrr
r
r
rrsrc@s2eZdZdZeed�dd�Zeed�dd��ZdS)	�
ArgumentErrorz�
    Raised when serialization or deserialization went wrong caused by a wrong
    argument when serializing or deserializing.
    )r�argumentcCs"t�||�t�||�||_dS)z�
        Constructor.
        :param message: the message describing the problem.
        :param argument: the name of the argument in question.
        N)rr�
ValueError�	_argument)r	rrr
r
rr&szArgumentError.__init__)�returncCs|jS)zV
        The argument in question.
        :return: the name of the argument.
        )r)r	r
r
rr0szArgumentError.argumentN)rr
rrrrrrr
r
r
rr s
rc@sNeZdZdZeeeed�dd�Ze	ed�dd��Z
e	eed�dd	��Zd
S)�DeserializationErrorz=
    Raised when deserialization failed for some reason.
    )r�source�targetcCst�||�||_||_dS)z�
        Constructor.
        :param message: the message describing the problem.
        :param source: the object that was to be deserialized.
        :param target: the type to which `source` was to be deserialized.
        N)rr�_source�_target)r	rrrr
r
rr>szDeserializationError.__init__)rcCs|jS)zr
        The object that was to be deserialized.
        :return: the object that was to be deserialized.
        )r)r	r
r
rrIszDeserializationError.sourcecCs|jS)z�
        The target type to which `source` was to be deserialized.
        :return: the type to which `source` was to be deserialized.
        )r)r	r
r
rrQszDeserializationError.targetN)rr
rrr�objectr�typerrrrr
r
r
rr9src@seZdZdZdS)�SerializationErrorz;
    Raised when serialization failed for some reason.
    N)rr
rrr
r
r
rrZsrc@s$eZdZdZeeeed�dd�ZdS)�DecodeErrorz�
    Raised when decoding a string or bytes to Python types failed. This error
    is actually a wrapper around `json.JSONDecodeError`.
    )rrr�errorcCs(t�||||�t�|||j|j�dS)a
        Constructor.
        :param message: the message of this error.
        :param source: the object that was to be deserialized.
        :param target: the type to which `source` was to be deserialized.
        :param error: the wrapped `JSONDecodeError`.
        N)rrr�doc�pos)r	rrrr!r
r
rrfs	zDecodeError.__init__N)	rr
rrrrrrrr
r
r
rr `sr c@s$eZdZdZeeeed�dd�ZdS)�UnfulfilledArgumentErrorzz
    Raised on a deserialization failure when an argument could not be fulfilled
    by the given object attr_getter.
    )rrrrcCs"t�||||�t�|||�dS)a
        Constructor.
        :param message: the message of this error.
        :param argument: the argument that was unfulfilled.
        :param source: the object that was to be deserialized.
        :param target: the type to which `source` was to be deserialized.
        N)rrr)r	rrrrr
r
rrysz!UnfulfilledArgumentError.__init__N)rr
rrrrrrr
r
r
rr$ss
r$c@s$eZdZdZeeeed�dd�ZdS)�SignatureMismatchErrorz�
    Raised when the source could not be deserialized into the target type due
    to a mismatch between the source's attributes and the target's accepted
    parameters. This error is raised in "strict-mode" only.
    )rrrrcCs"t�||||�t�|||�dS)a
        Constructor.
        :param message: the message of this error.
        :param argument: the argument that caused the problem.
        :param source: the object that was to be deserialized.
        :param target: the type to which `source` was to be deserialized.
        N)rrr)r	rrrrr
r
rr�szSignatureMismatchError.__init__N)rr
rrrrrrr
r
r
rr%�s
r%c@s4eZdZdZeeed�dd�Zeed�dd��ZdS)	�UnknownClassErrorz�
    Raised when jsons failed to find a type instance to deserialize to. If this
    error occurs, consider using ``jsons.announce_class``.
    )rr�target_namecCst�|||d�||_dS)z�
        Constructor.
        :param message: the message of this error.
        :param source: the object that was to be deserialized.
        :param target_name: the name of the type that was the target type.
        N)rr�_target_name)r	rrr'r
r
rr�szUnknownClassError.__init__)rcCs|jS)z�
        The name of the type that was unsuccessfully attempted to deserialize
        into.
        :return: the name of the type that was to be the target type.
        )r()r	r
r
rr'�szUnknownClassError.target_nameN)	rr
rrrrrrr'r
r
r
rr&�s
r&c@seZdZdZed�dd�ZdS)�InvalidDecorationErrorz9
    Raised when a jsons decorator was wrongly used.
    )rcCst�||�dS)zQ
        Constructor.
        :param message: the message of this error.
        N)rr)r	rr
r
rr�szInvalidDecorationError.__init__N)rr
rrrrr
r
r
rr)�sr)N)r�jsonr�typingrrrrrrrrr r$r%r&r)r
r
r
r�<module>s!