Skip to content

PortTypeError(port)

Bases: TypeError

Raised when a port isn't an int.

Create an error for a port that isn't an int.

Parameters:

Name Type Description Default
port object

Port that isn't an int.

required
Source code in src/notwork/exceptions/port_type_error.py
def __init__(self, port: object) -> None:
    """
    Create an error for a port that isn't an `int`.

    Args:
        port: Port that isn't an `int`.
    """
    super().__init__(port)
    self.port = port
    """The port that isn't an `int`."""

port = port instance-attribute

The port that isn't an int.