Skip to content

Exceptions

NZBException

Bases: Exception

Base exception for all nzb exceptions

InvalidNZBError

InvalidNZBError(message: str)

Bases: NZBException

Invalid NZB

Source code in src/nzb/_exceptions.py
def __init__(self, message: str) -> None:
    self.message = message
    """Human readable error message"""
    super().__init__(message)

message instance-attribute

message = message

Human readable error message

__repr__

__repr__() -> str
Source code in src/nzb/_exceptions.py
def __repr__(self) -> str:
    return f'{self.__class__.__name__}("{self.message}")'

__str__

__str__() -> str

Equivalent to accessing the .message attribute

Source code in src/nzb/_exceptions.py
def __str__(self) -> str:
    """Equivalent to accessing the .message attribute"""
    return self.message