Add error fields to the given BatchResult due to the given exception.
506658
private void buildErrorStatus(BatchResult result, Throwable ex) {
        result.setStatus(BatchResult.Status.ERROR);
        result.setErrorMessage(ex.getLocalizedMessage());
        if (ex instanceof IllegalArgumentException) {
            m_logger.debug("Batch update error: {}", ex.toString());
        } else {
            result.setStackTrace(Utils.getStackTrace(ex));
            m_logger.debug("Batch update error: {} stacktrace: {}",
                           ex.toString(), Utils.getStackTrace(ex));
        }
    }
933833
public void putExceptionThrownRule(ExceptionThrownRule exceptionThrownRule) {
        exceptionThrownRuleList.add(exceptionThrownRule);

        String[] exceptionTypes = exceptionThrownRule.getExceptionTypes();
        if (exceptionTypes != null) {
            for (String exceptionType : exceptionTypes) {
                if (exceptionType != null) {
                    if (!exceptionThrownRuleMap.containsKey(exceptionType)) {
                        exceptionThrownRuleMap.put(exceptionType, exceptionThrownRule);
                    }
                }
            }
        } else {
            defaultExceptionThrownRule = exceptionThrownRule;
        }
    }
387629
public static BatchResult newErrorResult(String errMsg) {
        BatchResult result = new BatchResult();
        result.setStatus(Status.ERROR);
        result.setErrorMessage(errMsg);
        return result;
    }
597537
public void addAllErrors(final Collection<ObjectError> errors) {
        ArgUtils.notNull(errors, "errors");
        this.errors.addAll(errors);
    }
1275249
def add_codes(err_cls):
    """"""
    class ErrorsWithCodes(object):
        def __getattribute__(self, code):
            msg = getattr(err_cls, code)
            return '[{code}] {msg}'.format(code=code, msg=msg)
    return ErrorsWithCodes()
1244747
public void addException(ClassConstant type, int start, int end, int handler)
  {
    _exceptions.add(new ExceptionItem(type.getIndex(), start, end, handler));
  }
605400
public void addError(GraphQLError error, ExecutionPath fieldPath) {
        //
        // see http://facebook.github.io/graphql/#sec-Errors-and-Non-Nullability about how per
        // field errors should be handled - ie only once per field if its already there for nullability
        // but unclear if its not that error path
        //
        for (GraphQLError graphQLError : errors) {
            List<Object> path = graphQLError.getPath();
            if (path != null) {
                if (fieldPath.equals(ExecutionPath.fromList(path))) {
                    return;
                }
            }
        }
        this.errors.add(error);
    }
1180274
public void addError(AbstractPageError ape) {
        if (_innerErrors == null) {
            _innerErrors = new InnerErrorReporter();
        }
        _innerErrors.addError(ape);
    }
1270344
def add_errors(self, *errors: Union[BaseSchemaError, SchemaErrorCollection]) -> None:
        
        for error in errors:
            self._error_cache.add(error)
742391
private void addError(short severity, SAXParseException spex) {
        if (spex.getLineNumber() > 0) {
            buf.append("Line " + spex.getLineNumber() + " - ");
        }
        buf.append(spex.getMessage() + "\n");
        ValidationError error = new ValidationError(severity, buf.toString());
        errors.add(error);
        buf.setLength(0);
    }
809164
public void addError(String field, String error) {
		Assert.notNull(field, "field must not be null");
		Assert.notNull(error, "field must not be null");

		addErrors(field, Collections.singletonList(error));

		addResultProperty(SUCCESS_PROPERTY, Boolean.FALSE);
	}
194772
def set_exception(self, exception):
        """"""
        was_handled = self._finish(self.errbacks, exception)
        if not was_handled:
            traceback.print_exception(
                type(exception), exception, exception.__traceback__)
913640
private void listErrors(final Result result) {
        for (JSError warning : result.warnings) {
            getLog().warn(warning.toString());
        }

        for (JSError error : result.errors) {
            getLog().error(error.toString());
        }
    }
416920
def add_error(expected_value, target_value)
      @errors[target_value.error_key] = <<-MSG

        Mismatch in field: '#{target_value.error_key}'
          expected: '#{expected_value.value}'
          received: '#{target_value.value}'

      MSG
    end
851304
def add_scan_error(self, scan_id, host='', name='', value='', port=''):
        
        self.scan_collection.add_result(scan_id, ResultType.ERROR, host, name,
                                        value, port)
1222502
@Override
    public synchronized void addBatch(final String name, final EntityEntry entry) throws DatabaseEngineException {

        try {

            final MappedEntity me = entities.get(name);

            if (me == null) {
                throw new DatabaseEngineException(String.format("Unknown entity '%s'", name));
            }

            PreparedStatement ps = me.getInsert();
            entityToPreparedStatement(me.getEntity(), ps, entry, true);

            ps.addBatch();
        } catch (final Exception ex) {
            throw new DatabaseEngineException("Error adding to batch", ex);
        }

    }
604564
public void addTypeBindError(final TypeBindException bindException, final Cell cell, final String fieldName, final String label) {
        addTypeBindError(bindException, CellPosition.of(cell), fieldName, label);
    }