Examples of ErrorDetails


Examples of com.linkedin.restli.common.ErrorDetails

    {
      er.setServiceErrorCode(result.getServiceErrorCode());
    }
    if (_errorResponseFormat.showDetails() && result.hasErrorDetails())
    {
      er.setErrorDetails(new ErrorDetails(result.getErrorDetails()));
    }

    if (_errorResponseFormat.showStacktrace())
    {
      StringWriter sw = new StringWriter();
View Full Code Here

Examples of com.linkedin.restli.common.ErrorDetails

  {
    final ErrorResponse er = new ErrorResponse();

    final DataMap errMap = new DataMap();
    errMap.put(errKey, errValue);
    er.setErrorDetails(new ErrorDetails(errMap));
    er.setStatus(httpCode);
    er.setMessage(errMsg);
    er.setServiceErrorCode(appCode);

    final byte[] mapBytes;
View Full Code Here

Examples of com.linkedin.restli.common.ErrorDetails

  {
    ErrorResponse er = new ErrorResponse();

    DataMap errMap = new DataMap();
    errMap.put(errKey, errValue);
    er.setErrorDetails(new ErrorDetails(errMap));
    er.setStatus(httpCode);
    er.setMessage(errMsg);
    er.setServiceErrorCode(appCode);

    byte[] mapBytes;
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

        }

        // Validate that the element has content that is non-whitespace
        Iterator contents = element.getContent().iterator();
        if (!contents.hasNext()) {
            ErrorDetails details = new ErrorDetails(element, new XPath(element),
                    null, FaultTypes.WHITESPACE, null, null);
            errorReporter.reportError(details);
        } else {
            do {
                Object content = contents.next();
                if (content == null || ((Text) content).getText().trim().
                        length() == 0) {
                    ErrorDetails details = new ErrorDetails(element, new XPath(element),
                            null, FaultTypes.WHITESPACE, null, null);
                    errorReporter.reportError(details);
                }
            } while (contents.hasNext());
        }
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

            if (decendents.size() > maxCount) {
                result = true;

                if (errorReporter != null) {
                    // @todo it would be nice to pass actual and max counts
                    ErrorDetails details = new ErrorDetails(element, new XPath(element),
                            null, errorKey, ancestorElementName, null);
                    errorReporter.reportError(details);
                }
            }
        }
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

                    errorReporter, min);
            BigDecimal maxDecimal = getBigDecimal(maxString, element,
                    errorReporter, max);
            if (minDecimal != null && maxDecimal != null &&
                    minDecimal.compareTo(maxDecimal) == 1) {
                ErrorDetails details = new ErrorDetails(element, new XPath(element),
                        null, FaultTypes.MIN_RANGE_MORE_THAN_MAX, null, null);
                errorReporter.reportError(details);
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

            ErrorReporter errorReporter, Attribute attribute) {
        BigDecimal result = null;
        try {
            result = new BigDecimal(value);
        } catch (NumberFormatException e) {
            ErrorDetails details = new ErrorDetails(element, new XPath(attribute),
                    null, FaultTypes.NOT_A_NUMBER, value, null);
            errorReporter.reportError(details);
        }
        return result;
    }
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

            XPath currentPath = getCurrentXPath();
            try {
                for (int i = 0; i < pendingErrors.size(); i++) {
                    String errorMessage = (String) pendingErrors.get(i);

                    ErrorDetails details =
                            new ErrorDetails(element, currentPath,
                                    errorMessage, null, null, attributes);
                    errorReporter.reportError(details);
                }
            } finally {
                // clear the error list as they have all been reported.
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

        }

        // Now we just report the duplicates
        for (int i = 0; i < duplicates.length; i++) {
            if (duplicates[i] != null) {
                ErrorDetails details = new ErrorDetails(element, duplicates[i],
                        null, FaultTypes.DUPLICATE_ASSET, null, null);
                errorReporter.reportError(details);
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xml.validation.ErrorDetails

            // More than one element in the list means that we have
            // an element with a duplicate name.
            if (duplicates.size() > 1) {
                for (int i = 0; i < duplicates.size(); i++) {
                    Element element = (Element) duplicates.get(i);
                    ErrorDetails details = new ErrorDetails(element, new XPath(element),
                            null, FaultTypes.DUPLICATE_NAME, null, null);
                    errorReporter.reportError(details);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.