'Flush errors from the list of caught errors. If no arguments are
specified, remove all errors. If arguments are specified, only remove
errors of those types from the stored list.'

def flushErrors(self, *errorTypes):

    if errorTypes:
        flushed = []
        remainder = []
        for f in self._errors:
            if f.check(*errorTypes):
                flushed.append(f)
            else:
                remainder.append(f)
        self._errors = remainder
    else:
        flushed = self._errors
        self._errors = []
    return flushed
