def METHOD_NAME(self, index):
    """Hihglights the error message at the given index and jumps to its location."""
    self._currentErrorIndex = index
    # set text format
    pos, anchor, url = self._errors[index]
    es = QTextEdit.ExtraSelection()
    es.cursor = QTextCursor(self.document())
    es.cursor.setPosition(pos)
    es.cursor.setPosition(anchor, QTextCursor.KeepAnchor)
    bg = qutil.mixcolor(self.palette().highlight().color(), self.palette().base().color(), 0.4)
    es.format.setBackground(bg)
    es.format.setProperty(QTextFormat.FullWidthSelection, True)
    self.setExtraSelections([es])
    # scroll log to the message
    cursor = QTextCursor(self.document())
    cursor.setPosition(anchor)
    self.setTextCursor(cursor)
    cursor.setPosition(pos)
    self.setTextCursor(cursor)
    # jump to the error location
    cursor = errors.errors(self._document()).cursor(url, True)
    if cursor:
        self.parentWidget().mainwindow().setTextCursor(cursor, findOpenView=True)