Skip to content

PortOutOfRangeError(port)

Bases: ValueError

Raised when a port isn't in the valid range.

Create an error for an out-of-range port.

Parameters:

Name Type Description Default
port int

Port that's out of range.

required
Source code in src/notwork/exceptions/port_out_of_range_error.py
def __init__(self, port: int) -> None:
    """
    Create an error for an out-of-range port.

    Args:
        port: Port that's out of range.
    """
    super().__init__(port)
    self.port = port
    """The port that's out of range."""

port = port instance-attribute

The port that's out of range.