#!/usr/bin/env python3
import typing as ty


class InvalidArgumentValueException(Exception):
    """
    Exception for argument of a function or method invalid.

    Attributes:
        value: Invalid value.
        message: Message to show in exception.
    """

    def __init__(self, value: ty.Union[int, float], message: str):
        """
        Exception for argument of a function or method invalid.

        Args:
            value: Invalid value.
            message: Message to show in exception.
        """
        self.value = value
        self.message = message
        super().__init__(self.message)


class ServerAtMaxUserCapacity(Exception):
    """
    Exception for server operating in max capacity.
    """

    def __init__(self):
        """
        Exception for server operating in max capacity.
        """
        super().__init__(
            "Cannot allocate more users, server is at maximum capacity"
        )


class ServerIsNotRunningAnyTask(Exception):
    """
    Exception for server not running any task.
    """

    def __init__(self):
        """
        Exception for server not running any task.
        """
        super().__init__("Server is not running any task")


class NoObjectFree(Exception):
    """
    Exception for load balancer not having free objects.
    """

    def __init__(self):
        """
        Exception for load balancer not having free objects.
        """
        super().__init__("No object free has available")

#!/usr/bin/env python3
import typing as ty


class InvalidArgumentValueException(Exception):
    """
    Exception for argument of a function or method invalid.

    Attributes:
        value: Invalid value.
        message: Message to show in exception.
    """

    def __init__(self, value: ty.Union[int, float], message: str):
        """
        Exception for argument of a function or method invalid.

        Args:
            value: Invalid value.
            message: Message to show in exception.
        """
        self.value = value
        self.message = message
        super().__init__(self.message)


class ServerAtMaxUserCapacity(Exception):
    """
    Exception for server operating in max capacity.
    """

    def __init__(self):
        """
        Exception for server operating in max capacity.
        """
        super().__init__(
            "Cannot allocate more users, server is at maximum capacity"
        )


class ServerIsNotRunningAnyTask(Exception):
    """
    Exception for server not running any task.
    """

    def __init__(self):
        """
        Exception for server not running any task.
        """
        super().__init__("Server is not running any task")


class NoObjectFree(Exception):
    """
    Exception for load balancer not having free objects.
    """

    def __init__(self):
        """
        Exception for load balancer not having free objects.
        """
        super().__init__("No object free has available")

#!/usr/bin/env python3 Exception for argument of a function or method invalid.      Attributes:         value: Invalid value.         message: Message to show in exception. Exception for argument of a function or method invalid.          Args:             value: Invalid value.             message: Message to show in exception. Exception for server operating in max capacity. Exception for server operating in max capacity. Exception for server not running any task. Exception for server not running any task. Exception for load balancer not having free objects. Exception for load balancer not having free objects.