/** * Receive notification of a validity error. * @param failure Information about the nature of the invalidity */ public void reportInvalidity(Invalidity failure) throws XPathException{ Logger localLogger = logger; if (localLogger == null) { localLogger = config.getLogger(); } String explanation = getExpandedMessage(failure); String constraintReference = getConstraintReferenceMessage(failure); String validationLocation = ((ValidationFailure) failure).getValidationLocationText(); String contextLocation = ((ValidationFailure) failure).getContextLocationText(); String finalMessage = "Validation error " + getLocationMessage(failure) + "\n " + wordWrap(explanation) + //wordWrap(validationLocation.isEmpty() ? "" : "\n " + validationLocation) + wordWrap(contextLocation.isEmpty() ? "" : "\n " + contextLocation) + wordWrap(constraintReference == null ? "" : "\n " + constraintReference) + StandardErrorListener.getOffenderListText((ValidationFailure)failure); localLogger.error(finalMessage); }
/** * Receive notification of a validity error. * @param failure Information about the nature of the invalidity */ public void reportInvalidity(Invalidity failure) throws XPathException{ Logger localLogger = logger; if (localLogger == null) { localLogger = config.getLogger(); } String explanation = getExpandedMessage(failure); String constraintReference = getConstraintReferenceMessage(failure); String validationLocation = ((ValidationFailure) failure).getValidationLocationText(); String contextLocation = ((ValidationFailure) failure).getContextLocationText(); String finalMessage = "Validation error " + getLocationMessage(failure) + "\n " + wordWrap(explanation) + //wordWrap(validationLocation.isEmpty() ? "" : "\n " + validationLocation) + wordWrap(contextLocation.isEmpty() ? "" : "\n " + contextLocation) + wordWrap(constraintReference == null ? "" : "\n " + constraintReference) + StandardErrorListener.getOffenderListText((ValidationFailure)failure); localLogger.error(finalMessage); }
String constraintReference = failure.getConstraintReferenceMessage(); String validationLocation = failure.getValidationLocationText(); String contextLocation = failure.getContextLocationText(); message = "Validation error " + getLocationMessage(exception) +
String constraintReference = failure.getConstraintReferenceMessage(); String validationLocation = failure.getValidationLocationText(); String contextLocation = failure.getContextLocationText(); message = "Validation error " + getLocationMessage(exception) +