Top Description Fields Constructors Methods
org.jdom2.input

public Class JDOMParseException

extends JDOMException
Class Inheritance
Imports
org.jdom2.*, org.xml.sax.*

Thrown during parse errors, with information about where the parse error occurred as well as access to the partially built document.
Author
Laurent Bihanic

Field Summary

Modifier and TypeField and Description
private final Document
partialDocument

The portion of the document that was successfully built before the parse error occurred.

private static final long
serialVersionUID

Hides org.jdom2.JDOMException.serialVersionUID.

Standard JDOM2 Exception Serialization.

Constructor Summary

AccessConstructor and Description
public
JDOMParseException(String
String message indicating the problem that occurred.
message
,
Throwable
Throwable that caused this to be thrown.
cause
)

This will create a parse Exception with the given message and wrap the Exception that cause a document parse to fail.

public
JDOMParseException(String
String message indicating the problem that occurred.
message
,
Throwable
Throwable that caused this to be thrown.
cause
,
Document
Document the portion of the input XML document that was successfully built.
partialDocument
)

This will create a parse Exception with the given message and the partial document and wrap the Exception that cause a document parse to fail.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

an integer representing the column number, or -1 if the information is not available.
getColumnNumber
()

Returns the column number of the end of the text where the parse error occurred.

public int

Returns:

an integer representing the line number, or -1 if the information is not available.
getLineNumber
()

Returns the line number of the end of the text where the parse error occurred.

public Document

Returns:

the partial document or null if none.
getPartialDocument
()

Returns the partial document that was successfully built before the error occurred.

public String

Returns:

a string containing the public identifier, or null if the information is not available.
getPublicId
()

Returns the public identifier of the entity where the parse error occurred.

public String

Returns:

a string containing the system identifier, or null if the information is not available.
getSystemId
()

Returns the system identifier of the entity where the parse error occurred.

Field Detail

partialDocumentback to summary
private final Document partialDocument

The portion of the document that was successfully built before the parse error occurred.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.jdom2.JDOMException.serialVersionUID.

Standard JDOM2 Exception Serialization. Default.

Constructor Detail

JDOMParseExceptionback to summary
public JDOMParseException(String message, Throwable cause)

This will create a parse Exception with the given message and wrap the Exception that cause a document parse to fail.

Parameters
message:String

String message indicating the problem that occurred.

cause:Throwable

Throwable that caused this to be thrown.

JDOMParseExceptionback to summary
public JDOMParseException(String message, Throwable cause, Document partialDocument)

This will create a parse Exception with the given message and the partial document and wrap the Exception that cause a document parse to fail.

Parameters
message:String

String message indicating the problem that occurred.

cause:Throwable

Throwable that caused this to be thrown.

partialDocument:Document

Document the portion of the input XML document that was successfully built.

Method Detail

getColumnNumberback to summary
public int getColumnNumber()

Returns the column number of the end of the text where the parse error occurred.

The first column in a line is position 1.

Returns:int

an integer representing the column number, or -1 if the information is not available.

getLineNumberback to summary
public int getLineNumber()

Returns the line number of the end of the text where the parse error occurred.

The first line in the document is line 1.

Returns:int

an integer representing the line number, or -1 if the information is not available.

getPartialDocumentback to summary
public Document getPartialDocument()

Returns the partial document that was successfully built before the error occurred.

Returns:Document

the partial document or null if none.

getPublicIdback to summary
public String getPublicId()

Returns the public identifier of the entity where the parse error occurred.

Returns:String

a string containing the public identifier, or null if the information is not available.

getSystemIdback to summary
public String getSystemId()

Returns the system identifier of the entity where the parse error occurred.

Returns:String

a string containing the system identifier, or null if the information is not available.