docs: public <P extends Stanza> P nextResultOrThrow(long timeout) throws NoResponseException,
                      XMPPErrorException, InterruptedException, NotConnectedException {
          P result;
          try {
              result = nextResult(timeout);
          } finally {
              cancel();
          }
          if (result == null) {
              if (connectionException != null) {
                  throw new NotConnectedException(connection, packetFilter, connectionException);
              }
              if (!connection.isConnected()) {
                  throw new NotConnectedException(connection, packetFilter);
              }
              throw NoResponseException.newWith(timeout, this, cancelled);
          }
  
          XMPPErrorException.ifHasErrorThenThrow(result);
  
          return result;
      }