# Path: puresnmp/const.py
# MAX_VARBINDS = 2147483647


import socket
from typing import Optional
from x690.types import ObjectIdentifier  # type: ignore
from puresnmp.const import MAX_VARBINDS
class GenErr(ErrorResponse):
    """
    This error is returned for any error which is not covered in the previous
    error classes.
    """

    DEFAULT_MESSAGE = "General Error (genErr)"

    def __init__(self, offending_oid, message=""):
        # type: (Optional[ObjectIdentifier], str) -> None
        super().__init__(5, offending_oid, message)


class EmptyMessage(SnmpError):
    """
    Raised when trying to decode an SNMP-Message with no content.
    """


class TooManyVarbinds(SnmpError):
    """
    Exception which is raised when the number of VarBinds exceeds the limit
    defined in RFC3416.
    device.
    """

    def __init__(self, num_oids):
        # type: (int) -> None
        super().__init__(
            "Too many VarBinds (%d) in one request!"

# Path: puresnmp/const.py
# MAX_VARBINDS = 2147483647


# Path: puresnmp/exc.py
import socket
from typing import Optional
from x690.types import ObjectIdentifier  # type: ignore
from puresnmp.const import MAX_VARBINDS

class GenErr(ErrorResponse):
    """
    This error is returned for any error which is not covered in the previous
    error classes.
    """

    DEFAULT_MESSAGE = "General Error (genErr)"

    def __init__(self, offending_oid, message=""):
        # type: (Optional[ObjectIdentifier], str) -> None
        super().__init__(5, offending_oid, message)


class EmptyMessage(SnmpError):
    """
    Raised when trying to decode an SNMP-Message with no content.
    """


class TooManyVarbinds(SnmpError):
    """
    Exception which is raised when the number of VarBinds exceeds the limit
    defined in RFC3416.
    device.
    """

    def __init__(self, num_oids):
        # type: (int) -> None
        super().__init__(
            "Too many VarBinds (%d) in one request!"

            " RFC3416 limits requests to %d!" % (num_oids, MAX_VARBINDS)