Package net.sf.saxon.type
Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.xml.transform.TransformerException
net.sf.saxon.trans.XPathException
net.sf.saxon.type.ValidationException
- All Implemented Interfaces:
- Serializable
This exception indicates a failure when validating an instance against a type
 defined in a schema. It may also be used when validating against a built-in type.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class net.sf.saxon.trans.XPathExceptionXPathException.Circularity, XPathException.StackOverflow
- 
Constructor SummaryConstructorsConstructorDescriptionValidationException(Exception exception) Creates a new ValidationException with the given nested exception.ValidationException(String message, Exception exception) Creates a new ValidationException with the given message and nested exception.ValidationException(String message, Location locator) Create a new ValidationException from a message and a Locator.ValidationException(ValidationFailure failure) Create a new ValidationException that wraps a ValidationFailure
- 
Method SummaryModifier and TypeMethodDescriptionGet the location of the error as a structured path objectReturns the detail message string of this throwable.getNode()getPath()Get the location of the error in terms of a path expressed as a stringGet a ValidationFailure object containing information from this ValidationExceptiontoString()Returns the String representation of this ExceptionMethods inherited from class net.sf.saxon.trans.XPathExceptionasStaticError, asTypeError, asTypeErrorIf, fromXmlProcessingError, getErrorCodeQName, getErrorObject, getFailingExpression, getHostLanguage, getLocator, getXPathContext, hasBeenReported, hasErrorCode, isGlobalError, isReportableStatically, isStaticError, isSyntaxError, isTypeError, makeXPathException, maybeSetContext, maybeSetErrorCode, maybeSetLocation, maybeWithContext, maybeWithErrorCode, maybeWithFailingExpression, maybeWithLocation, replacingErrorCode, setErrorCode, setErrorCodeQName, setErrorObject, setHasBeenReported, setHostLanguage, setHostLanguage, setIsGlobalError, setIsStaticError, setIsSyntaxError, setIsTypeError, setLocation, setXPathContext, showErrorCode, withErrorCode, withErrorCode, withFailingExpression, withLocation, withMessage, withXPathContextMethods inherited from class javax.xml.transform.TransformerExceptiongetCause, getException, getLocationAsString, getMessageAndLocation, initCause, printStackTrace, printStackTrace, printStackTrace, setLocatorMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, setStackTrace
- 
Constructor Details- 
ValidationExceptionCreates a new ValidationException with the given nested exception.- Parameters:
- exception- the nested exception
 
- 
ValidationExceptionCreates a new ValidationException with the given message and nested exception.- Parameters:
- message- the detail message for this exception
- exception- the nested exception
 
- 
ValidationExceptionCreate a new ValidationException from a message and a Locator.- Parameters:
- message- The error or warning message.
- locator- The locator object for the error or warning.
 
- 
ValidationExceptionCreate a new ValidationException that wraps a ValidationFailure- Parameters:
- failure- the ValidationFailure to be wrapped
 
 
- 
- 
Method Details- 
getMessageReturns the detail message string of this throwable.- Overrides:
- getMessagein class- Throwable
- Returns:
- the detail message string of this Throwableinstance (which may benull).
 
- 
getValidationFailureGet a ValidationFailure object containing information from this ValidationException- Returns:
- a ValidationFailure object
 
- 
toStringReturns the String representation of this Exception
- 
getNode
- 
getPathGet the location of the error in terms of a path expressed as a string- Returns:
- the location, as a path. The result format is similar to that of the fn:path() function
 
- 
getAbsolutePathGet the location of the error as a structured path object- Returns:
- the location, as a structured path object indicating the position of the error within the containing document
 
 
-