| java.lang.Object java.lang.Throwable java.lang.Exception nu.xom.ParsingException nu.xom.ValidityException
ValidityException | public class ValidityException extends ParsingException (Code) | |
Signals a validity error in a document being parsed.
These are not thrown by default, unless you specifically
request that the builder validate.
author: Elliotte Rusty Harold version: 1.1b3 |
Constructor Summary | |
public | ValidityException(String message, Throwable cause)
Creates a new ValidityException
with a detail message and an underlying root cause. | public | ValidityException(String message, int lineNumber, int columnNumber)
Creates a new ValidityException
with a detail message and line and column numbers. | public | ValidityException(String message, int lineNumber, int columnNumber, Throwable cause)
Creates a new ValidityException
with a detail message, line and column numbers,
and an underlying exception. | public | ValidityException(String message, String uri, int lineNumber, int columnNumber)
Creates a new ValidityException
with a detail message, the URI of the document that contained
the error, and approximate line and column numbers of the
first validity error. | public | ValidityException(String message, String uri, int lineNumber, int columnNumber, Throwable cause)
Creates a new ValidityException
with a detail message, URI of the document containing the
validity error, line and column numbers of the error,
and an underlying exception. | public | ValidityException(String message)
Creates a new ValidityException
with a detail message. |
ValidityException | public ValidityException(String message, Throwable cause)(Code) | |
Creates a new ValidityException
with a detail message and an underlying root cause.
Parameters: message - a string indicating the specific problem Parameters: cause - the original cause of this exception |
ValidityException | public ValidityException(String message, int lineNumber, int columnNumber)(Code) | |
Creates a new ValidityException
with a detail message and line and column numbers.
Parameters: message - a string indicating the specific problem Parameters: lineNumber - the approximate line number where the problem occurs Parameters: columnNumber - the approximate column numberwhere the problem occurs |
ValidityException | public ValidityException(String message, int lineNumber, int columnNumber, Throwable cause)(Code) | |
Creates a new ValidityException
with a detail message, line and column numbers,
and an underlying exception.
Parameters: message - a string indicating the specific problem Parameters: lineNumber - the approximate line number where the problem occurs Parameters: columnNumber - the approximate column number where the problem occurs Parameters: cause - the original cause of this exception |
ValidityException | public ValidityException(String message, String uri, int lineNumber, int columnNumber)(Code) | |
Creates a new ValidityException
with a detail message, the URI of the document that contained
the error, and approximate line and column numbers of the
first validity error.
Parameters: message - a string indicating the specific problem Parameters: lineNumber - the approximate line number where the problem occurs Parameters: columnNumber - the approximate column numberwhere the problem occurs |
ValidityException | public ValidityException(String message, String uri, int lineNumber, int columnNumber, Throwable cause)(Code) | |
Creates a new ValidityException
with a detail message, URI of the document containing the
validity error, line and column numbers of the error,
and an underlying exception.
Parameters: message - a string indicating the specific problem Parameters: lineNumber - the approximate line number where the problem occurs Parameters: columnNumber - the approximate column number where the problem occurs Parameters: cause - the original cause of this exception |
ValidityException | public ValidityException(String message)(Code) | |
Creates a new ValidityException
with a detail message.
Parameters: message - a string indicating the specific problem |
getColumnNumber | public int getColumnNumber(int n)(Code) | |
Returns the column number of the nth validity
error. It returns -1 if this is not known. This number
may be helpful for debugging, but should not be relied on.
Different parsers may set it differently. For instance
a problem with an element might be reported using the
column of the < or the >
of the start-tag
Parameters: n - the index of the validity error to report the approximate column where the nth validity error was detected throws: IndexOutOfBoundsException - if n is greaterthan or equal to the number of errors detected |
getDocument | public Document getDocument()(Code) | |
Returns a Document object for the document that
caused this exception. This is useful if you want notification
of validity errors, but nonetheless wish to further process
the invalid document.
the invalid document |
getErrorCount | public int getErrorCount()(Code) | |
Returns the number of validity errors the parser detected
in the document. This is likely to not be consistent from one
parser to another.
the number of validity errors the parser detected |
getLineNumber | public int getLineNumber(int n)(Code) | |
Returns the line number of the nth validity
error. It returns -1 if this is not known. This number
may be helpful for debugging, but should not be relied on.
Different parsers may set it differently. For instance
a problem with an element might be reported using the
line number of the start-tag or the line number of the
end-tag.
Parameters: n - the index of the validity error to report the approximate line number where the nth validity error was detected throws: IndexOutOfBoundsException - if n is greaterthan or equal to the number of errors detected |
getValidityError | public String getValidityError(int n)(Code) | |
Returns a message indicating a specific validity problem
in the input document as detected by the parser. Normally,
these will be in the order they appear in the document.
For instance, an error in the root element is likely
to appear before an error in a child element. However, this
depends on the underlying parser and is not guaranteed.
Parameters: n - the index of the validity error to report a string describing the nth validity error throws: IndexOutOfBoundsException - if n is greaterthan or equal to the number of errors detected |
|
|