def METHOD_NAME(self, line):
    for error_regex in self.error_regexes:
        if self._regex_helper.search_compiled(error_regex, line):
            self.set_exception(CommandFailure(self, "Found error regex '{}' in line '{}'".format(
                error_regex, line)))
            raise ParsingDone()