Recursively get errors from descendants

        :rtype: list of :ConfigErrors:
423747
def _get_descendants_errors(self):  # type: () -> List(ConfigError)
        """"""
        descendants_errors = []
        if hasattr(self, '_children'):
            if isinstance(self._children, (list, tuple)):
                for c in self._children:
                    descendants_errors += c._get_all_errors()
            elif isinstance(self._children, dict):
                for c in self._children.values():
                    descendants_errors += c._get_all_errors()

        return descendants_errors
572103
public static void filterErrorsForRecipes( Collection<? extends RoboconfError> errors ) {

		filterErrors(
				errors,
				ErrorCode.RM_ROOT_INSTALLER_MUST_BE_TARGET,
				ErrorCode.RM_UNRESOLVABLE_FACET_VARIABLE,
				ErrorCode.RM_UNREACHABLE_COMPONENT,
				ErrorCode.RM_ORPHAN_FACET,
				ErrorCode.RM_ORPHAN_FACET_WITH_CHILDREN );
	}
1023274
function serializeError(err) {
  var o = {};

  Object.getOwnPropertyNames(err).forEach(function (k) {
    o[k] = err[k];
  });

  return _.omit(o, ['stack', 'type', 'arguments']);
}
729712
def get_errors(self):
        
        errors = []
        errors.extend(self._get_signature_errors())
        errors.extend(self._get_additional_errors())
        errors.extend(self._get_entry_errors())

        return errors if errors else None
974394
private void makeErrorList( final DRLParser parser ) {
        for ( final DroolsParserException recogErr : lexer.getErrors() ) {
            final ParserError err = new ParserError( resource,
                                                     recogErr.getMessage(),
                                                     recogErr.getLineNumber(),
                                                     recogErr.getColumn() );
            this.results.add( err );
        }
        for ( final DroolsParserException recogErr : parser.getErrors() ) {
            final ParserError err = new ParserError( resource,
                                                     recogErr.getMessage(),
                                                     recogErr.getLineNumber(),
                                                     recogErr.getColumn() );
            this.results.add( err );
        }
    }
136548
def get_errors(self):
        
        return [{cr.component_name: cr.get_error()}
                for cr in self.component_results if cr.has_error()]
371277
def _fetch_error_descriptions(self, error_dict):
        

        error_descriptions = []

        for error in error_dict[self._FIELD_ERROR]:
            description = error[self._FIELD_ERROR_DESCRIPTION]
            error_descriptions.append(description)

        return error_descriptions
437011
function buildError(err, hackErr) {
  var stack1 = err.stack;
  var stack2 = hackErr.stack;
  var label = hackErr.label;

  var stack = [];

  stack1.split('\n').forEach(function(line, index, arr) {
    if (line.match(/^    at GeneratorFunctionPrototype.next/)) {
      stack = stack.concat(arr.slice(0, index));
      return;
    }
  });

  stack = stack.concat(stack2.split('\n').slice(2));
  if (!stack[0].match(/^Error:/)) {
    stack.unshift(err.message);
  }
  if (!!label) {
    stack.unshift('[DEBUG: ' + label + ']');
  }
  stack = stack.join('\n');

  var newError = new Error();
  newError.message = err.message;
  newError.stack = stack;

  return newError;
}
22862
def call_and_catch_errors(self, f, *args, **kwargs):
        
        try:
            return f(*args, **kwargs)
        except SassError as e:
            if self.live_errors:
                # TODO should this setting also capture and display warnings?
                return e.to_css()
            else:
                raise
120618
def _get_args_and_errors(self, minuit=None, args=None, errors=None):
    
    ret_arg = None
    ret_error = None
    if minuit is not None:  # case 1
        ret_arg = minuit.args
        ret_error = minuit.errors
        return ret_arg, ret_error

    # no minuit specified use args and errors
    if args is not None:
        if isinstance(args, dict):
            ret_arg = parse_arg(self, args)
        else:
            ret_arg = args
    else:  # case 3
        ret_arg = self.last_arg

    if errors is not None:
        ret_error = errors

    return ret_arg, ret_error
551301
def fetch_errors_from(self, path):
        
        node = self.fetch_node_from(path)
        if node is not None:
            return node.errors
        else:
            return ErrorList()
405883
def get_field_errors(node):
        
        assert node.Name == 'securityData' and not node.IsArray
        nodearr = node.GetElement('fieldExceptions')
        if nodearr.NumValues > 0:
            secid = XmlHelper.get_child_value(node, 'security')
            errors = XmlHelper.as_field_error(nodearr, secid)
            return errors
        else:
            return None
935568
def check_list_errors(self, checkFunc, lst):
        """"""
        # check for errors on each subitem, filter only subitems with errors
        results = (checkFunc(i) for i in lst)
        return [err for err in results if err]
40590
def _parse_error_tree(error):
    
    errinf = ErrorInfo(error.get('id'), None)
    if error.text is not None:
        errinf.message = error.text
    else:
        desc = error.find('./desc')
        if desc is not None:
            errinf.message = desc.text
    return errinf
1130282
def findAllExceptions(pathToCheck):
    
    finder = PatternFinder()
    if os.path.isfile(pathToCheck):
        with open(pathToCheck) as f:
            findPatternsInFile(f.read(), finder)
    else:
        for path, dirs, files in os.walk(pathToCheck):
            for file in files:
                _, extname = os.path.splitext(file)
                if extname == ".py":
                    pathFile = os.path.join(path, file)
                    with open(pathFile) as f:
                        findPatternsInFile(f.read(), finder)
    return finder.patternsFunc, finder.patternsClass
623853
def errors(self):
        
        try:
            return self.__dict__['errors']
        except KeyError:
            pass

        suberrors = dict()
        for err in self.response_doc.findall('error'):
            field = err.attrib['field']
            symbol = err.attrib['symbol']
            message = err.text
            sub_err = self.Suberror(field, symbol, message)

            # If the field exists, we need to turn the suberror
            # into a list of suberrors
            if field in suberrors:
                if type(suberrors[field]) != list:
                    suberrors[field] = [suberrors[field]]
                suberrors[field].append(sub_err)
            else:
                suberrors[field] = sub_err

        self.__dict__['errors'] = suberrors
        return suberrors
622681
def get_object_errors(self):
        
        if self._object_errors is None:
            self._object_errors = [{str(o): o.get_errors()}
                                   for o in self.objects()
                                   if o.has_error()]

        return self._object_errors