def METHOD_NAME(self, errorname, errortext):
    """Adds an error message to this unit."""
    # TODO: consider factoring out: some duplication between XLIFF and TMX
    text = errorname
    if errortext:
        text += ": " + errortext
    self.addnote(text, origin="pofilter")