private function throwConnectException(): self
    {
        switch ($this->connectReturnCode) {
            case 1:
                throw new UnacceptableProtocolVersion(
                    'The Server does not support the level of the MQTT protocol requested by the Client'
                );
            case 2:
                throw new IdentifierRejected('The Client identifier is correct UTF-8 but not allowed by the Server');
            case 3:
                throw new ServerUnavailable('The Network Connection has been made but the MQTT service is unavailable');
            case 4:
                throw new BadUsernameOrPassword('The data in the user name or password is malformed');
            case 5:
                throw new NotAuthorized('The Client is not authorized to connect');
            default:
                throw new GenericError(sprintf(
                    'Reserved for future use or error not implemented yet (Error code: %d)',
                    $this->connectReturnCode
                ));
        }
    }