def METHOD_NAME(self, error_code: int) -> None:
    if error_code == ERR_INVALID_CMD:
        raise Exception("Received error: invalid command")
    if error_code == ERR_INVALID_LEN:
        raise Exception("Received error: invalid length")
    if error_code == ERR_INVALID_SEQ:
        raise Exception("Received error: invalid sequence")
    if error_code == ERR_CHANNEL_BUSY:
        raise Exception("Received error: channel busy")
    if error_code == 0x7E:
        raise Exception("Received error: encryption failed")
    if error_code == ERR_OTHER:
        raise Exception("Received unknown error")
    raise Exception("Received error: %d" % error_code)