Add error fields to the given ObjectResult due to the given exception.
501108
private void buildErrorStatus(ObjectResult result, String objID, Throwable ex) {
        result.setStatus(ObjectResult.Status.ERROR);
        result.setErrorMessage(ex.getLocalizedMessage());
        if (!Utils.isEmpty(objID)) {
            result.setObjectID(objID);
        }
        if (ex instanceof IllegalArgumentException) {
            m_logger.debug("Object update error: {}", ex.toString());
        } else {
            result.setStackTrace(Utils.getStackTrace(ex));
            m_logger.debug("Object update error: {} stacktrace: {}",
                           ex.toString(), Utils.getStackTrace(ex));
        }
    }
288277
public void error(Object o) {
        if (o instanceof Throwable) {
            logger.error(o, (Throwable) o);
        } else {
            logger.error(o);
        }
    }
406142
protected void addAllowedValuesToDescription(ModelNode result, ParameterValidator validator) {
        if (allowedValues != null) {
            for (ModelNode allowedValue : allowedValues) {
                result.get(ModelDescriptionConstants.ALLOWED).add(allowedValue);
            }
        } else if (validator instanceof AllowedValuesValidator) {
            AllowedValuesValidator avv = (AllowedValuesValidator) validator;
            List<ModelNode> allowed = avv.getAllowedValues();
            if (allowed != null) {
                for (ModelNode ok : allowed) {
                    result.get(ModelDescriptionConstants.ALLOWED).add(ok);
                }
            }
        }
    }
148679
def add_exception_handler(self, exception_type, error_handler, versions=(None, )):
        """"""
        versions = (versions, ) if not isinstance(versions, (tuple, list)) else versions
        if not hasattr(self, '_exception_handlers'):
            self._exception_handlers = {}

        for version in versions:
            placement = self._exception_handlers.setdefault(version, OrderedDict())
            placement[exception_type] = (error_handler, ) + placement.get(exception_type, tuple())
563044
public FessMessages addErrorsResultSizeExceeded(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_result_size_exceeded));
        return this;
    }
270506
private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
   {
      String year = date.getYear();
      if (year == null || year.isEmpty())
      {
         // In order to process recurring exceptions using MPXJ, we need a start and end date
         // to constrain the number of dates we generate.
         // May need to pre-process the tasks in order to calculate a start and finish date.
         // TODO: handle recurring exceptions
      }
      else
      {
         Calendar calendar = DateHelper.popCalendar();
         calendar.set(Calendar.YEAR, Integer.parseInt(year));
         calendar.set(Calendar.MONTH, NumberHelper.getInt(date.getMonth()));
         calendar.set(Calendar.DAY_OF_MONTH, NumberHelper.getInt(date.getDate()));
         Date exceptionDate = calendar.getTime();
         DateHelper.pushCalendar(calendar);
         ProjectCalendarException exception = mpxjCalendar.addCalendarException(exceptionDate, exceptionDate);

         // TODO: not sure how NEUTRAL should be handled
         if ("WORKING_DAY".equals(date.getType()))
         {
            exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
            exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
         }
      }
   }
715583
public static void printError(Object errorMessage)
	{

		if (errorMessage instanceof Throwable)
		{

			Throwable e = (Throwable) errorMessage;

			getLog(Debugger.class).error(stackTrace(e));

		}
		else
			getLog(Debugger.class).error(errorMessage);

	}
698070
public void map(Class<? extends Exception> exceptionClass, ExceptionHandlerImpl handler) {
        this.exceptionMap.put(exceptionClass, handler);
    }
562493
protected String buildErrorSetMsg(Object obj, Object value, Field aField)
    {
        String eol = SystemUtils.LINE_SEPARATOR;
        StringBuffer buf = new StringBuffer();
        buf
                .append(eol + "[try to set 'object value' in 'target object'")
                .append(eol + "target obj class: " + (obj != null ? obj.getClass().getName() : null))
                .append(eol + "target field name: " + (aField != null ? aField.getName() : null))
                .append(eol + "target field type: " + (aField != null ? aField.getType() : null))
                .append(eol + "target field declared in: " + (aField != null ? aField.getDeclaringClass().getName() : null))
                .append(eol + "object value class: " + (value != null ? value.getClass().getName() : null))
                .append(eol + "object value: " + (value != null ? value : null))
                .append(eol + "]");
        return buf.toString();
    }
696682
public ValidationPlanResult append(Collection<ValidationResult> results) {
		if (results == null) {
			return this;
		}
		for (ValidationResult message : results) {
			addResult(message);
		}
		return this;
	}
1190177
protected void addCommitError(Exception error) {

        if (m_commitErrors == null) {
            m_commitErrors = new ArrayList<Throwable>();
        }
        m_commitErrors.add(error);
    }
760536
def _add_error(self, message):
        """"""
        error_line = Result(False, None, message, Directive(""))
        self._suite.addTest(Adapter(self._filename, error_line))
1140463
private void updateErrors() {
		boolean oldErrors = hasErrors;
		hasErrors = false;
		if (validationResults.getHasErrors()) {
			hasErrors = true;
		}
		else {
			Iterator childIter = children.iterator();
			while (childIter.hasNext()) {
				ValidationResultsModel childModel = (ValidationResultsModel) childIter.next();
				if (childModel.getHasErrors()) {
					hasErrors = true;
					break;
				}
			}
		}
		firePropertyChange(HAS_ERRORS_PROPERTY, oldErrors, hasErrors);
	}
453345
public void addException(TypeDesc type) {
        if (mExceptions == null) {
            addAttribute(new ExceptionsAttr(mCp));
        }
        // TODO: Special handling for generics
        ConstantClassInfo cci = mCp.addConstantClass(type);
        mExceptions.addException(cci);
    }
562815
public void setResult(Result result) throws IllegalArgumentException
  {

    if (null == result)
      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULT_NULL, null)); //"result should not be null");

    try
    {
//      ContentHandler handler =
//        m_transformer.createResultContentHandler(result);
//      m_transformer.setContentHandler(handler);
        SerializationHandler xoh = 
            m_transformer.createSerializationHandler(result);
        m_transformer.setSerializationHandler(xoh);
    }
    catch (javax.xml.transform.TransformerException te)
    {
      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULT_COULD_NOT_BE_SET, null)); //"result could not be set");
    }

    m_result = result;
  }
619031
def addError(self, test, exception):
        
        result = self._handle_result(
            test, TestCompletionStatus.error, exception=exception)
        self.errors.append(result)
        self._mirror_output = True
1244773
public void addError(ValidationError error) {
        if (CollectionUtil.isEmpty(errors)) {
            errors = CollectionUtil.createArrayList(Const.INITIAL_CAPACITY);
        }
        errors.add(error);
    }