Adds the exception and all of the causes to the given list of exceptions
185246
public static void addThrowableAndCauses(List<ThrowableDTO> exceptions, Throwable exception) {
        if (exception != null) {
            ThrowableDTO dto = new ThrowableDTO(exception);
            exceptions.add(dto);
            Throwable cause = exception.getCause();
            if (cause != null && cause != exception) {
                addThrowableAndCauses(exceptions, cause);
            }
        }
    }
559012
def add(self, error):
        
        if not self._path_of_(error):
            self.errors.append(error)
            self.errors.sort()
        else:
            super(ErrorTree, self).add(error)
873038
@Override
    public void showErrors(final List<EditorError> errors) {
        StringBuilder sb = new StringBuilder();
        for (EditorError error : errors) {

            if (error.getEditor() == this) {
                sb.append("\n").append(error.getMessage());
            }
        }

        boolean hasErrors = sb.length() > 0;
        if (!hasErrors) {
            view.clearError();
            return;
        }

        // Show the errors.
        view.showError(new SafeHtmlBuilder().appendEscaped(sb.substring(1)).toSafeHtml());
    }
619031
def addError(self, test, exception):
        
        result = self._handle_result(
            test, TestCompletionStatus.error, exception=exception)
        self.errors.append(result)
        self._mirror_output = True
1270344
def add_errors(self, *errors: Union[BaseSchemaError, SchemaErrorCollection]) -> None:
        
        for error in errors:
            self._error_cache.add(error)
725142
def append_exception(self,
                         stacktrace):
        
        # Delete the last message of the list
        if len(self.exceptions) > 0:
            del self.exceptions[-1]

        # Append the new message at the top
        self.exceptions.insert(0, stacktrace)
        self.changes_made = True

        # Redraw
        self.redraw()
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 );
        }
    }
838594
public void addErrorsProperties(Map<String,Object> properties, Object errorsType)
    {
        try {
            Method method = errorsType.getClass().getMethod("getErrors", EMPTY_PARAMS);
            if (method != null)
            {
                Object value = method.invoke(errorsType, EMPTY_DATA);
                if (value instanceof List<?>)
                {
                    for (Object errorType : (List<?>)value)
                    {
                        method = errorType.getClass().getMethod("getShortText", EMPTY_PARAMS);
                        if (method != null)
                        {
                            value = method.invoke(errorType, EMPTY_DATA);
                            if (value instanceof String)
                                properties.put("Error", value);
                        }
                    }                
                }
            }
        } catch (SecurityException e) {
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
894095
def add_error(name=None, code=None, status=None):
    """"""
    if not name or not status or not code:
        raise Exception("Can't create Exception class %s: you must set both name, status and code" % name)
    myexception = type(name, (PyMacaronException, ), {"code": code, "status": status})
    globals()[name] = myexception
    if code in code_to_class:
        raise Exception("ERROR! Exception %s is already defined." % code)
    code_to_class[code] = myexception
    return myexception
953368
protected void addExceptions(ExecutableElement member, Content htmltree, int indentSize) {
        List<? extends TypeMirror> exceptions = member.getThrownTypes();
        if (!exceptions.isEmpty()) {
            CharSequence indent = makeSpace(indentSize + 1 - 7);
            htmltree.addContent(DocletConstants.NL);
            htmltree.addContent(indent);
            htmltree.addContent("throws ");
            indent = makeSpace(indentSize + 1);
            Content link = writer.getLink(new LinkInfoImpl(configuration, MEMBER, exceptions.get(0)));
            htmltree.addContent(link);
            for(int i = 1; i < exceptions.size(); i++) {
                htmltree.addContent(",");
                htmltree.addContent(DocletConstants.NL);
                htmltree.addContent(indent);
                Content exceptionLink = writer.getLink(new LinkInfoImpl(configuration, MEMBER,
                        exceptions.get(i)));
                htmltree.addContent(exceptionLink);
            }
        }
    }
465457
private void addException(ObjectName pName, Exception pExp) {
        JSONObject mBeansMap = getOrCreateJSONObject(infoMap, pName.getDomain());
        JSONObject mBeanMap = getOrCreateJSONObject(mBeansMap, getKeyPropertyString(pName));
        mBeanMap.put(DataKeys.ERROR.getKey(), pExp.toString());
    }
190726
public void addException(final AbstractPerfidixMethodException exec) {
        this.getExceptions().add(exec);
        for (final AbstractOutput output : outputs) {
            output.listenToException(exec);
        }
    }
740280
protected function addError(Exception $e) {
        $errors = $this->getErrors();
        $errors[] = $e;
        $this->setErrors($errors);
    }
980284
public ExecutorCommand<V> withExcludedExceptions(List<Class<? extends Exception>> excludedExceptions) {
        config.setExcludedExceptions(excludedExceptions);
        return this;
    }
363505
def unwrap_causes(cause)
      causes, c, i = [], cause, 0

      while c && i < MAX_EXCEPTION_CAUSES
        causes << {
          class: c.class.name,
          message: c.message,
          backtrace: parse_backtrace(c.backtrace || caller)
        }
        i += 1
        c = exception_cause(c)
      end

      causes
    end
1103275
def add_error(self, error):
        
        if is_non_string_iterable(error) and not isinstance(error, collections.Mapping):
            for value in error:
                self.add_error(value)
        else:
            self.append(error)
1211260
public List<Exception> getCriticalExceptions() {
		List<Exception> exceptions = new Vector<Exception>(exception == null ? 0 : 1);
		if (exception != null) exceptions.add(exception);
		return exceptions;
	}