Package org.jfree.xml
Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.xml.sax.SAXException
org.jfree.xml.ParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ElementDefinitionException
A parse exception.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ParseException with the given root exception.ParseException
(Exception e, Locator locator) Creates a new ParseException with the given root exception and the locator.ParseException
(String message) Creates a new ParseException with the given message.ParseException
(String s, Exception e) Creates a new ParseException with the given message and root exception.ParseException
(String s, Exception e, Locator locator) Creates a new ParseException with the given message, root exception and the locator.ParseException
(String message, Locator locator) Creates a new ParseException with the given message and the locator. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
fillLocation
(Locator locator) Fills the location with the given locator.int
Returns the column of the parse position where the error occured.int
getLine()
Returns the line of the parse position where the error occured.Modifies the message to give more detailed location information.void
printStackTrace
(PrintStream stream) Prints the stack trace to the specified stream.void
printStackTrace
(PrintWriter writer) Prints the stack trace to the specified writer.toString()
Override toString to pick up any embedded exception.Methods inherited from class org.xml.sax.SAXException
getCause, getException
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace
-
Field Details
-
line
private int lineThe line, where the error occured. -
column
private int columnThe column, where the error occured.
-
-
Constructor Details
-
ParseException
Creates a new ParseException with the given message.- Parameters:
message
- the message
-
ParseException
Creates a new ParseException with the given root exception.- Parameters:
e
- the exception
-
ParseException
Creates a new ParseException with the given message and root exception.- Parameters:
s
- the messagee
- the exception
-
ParseException
Creates a new ParseException with the given message and the locator.- Parameters:
message
- the messagelocator
- the locator of the parser
-
ParseException
Creates a new ParseException with the given root exception and the locator.- Parameters:
e
- the exceptionlocator
- the locator of the parser
-
ParseException
Creates a new ParseException with the given message, root exception and the locator.- Parameters:
s
- the messagee
- the exceptionlocator
- the locator of the parser
-
-
Method Details
-
getMessage
Modifies the message to give more detailed location information.- Overrides:
getMessage
in classSAXException
- Returns:
- the modified exception message.
-
fillLocation
Fills the location with the given locator.- Parameters:
locator
- the locator or null.
-
getLine
public int getLine()Returns the line of the parse position where the error occured.- Returns:
- the line number or -1 if not known.
-
getColumn
public int getColumn()Returns the column of the parse position where the error occured.- Returns:
- the column number or -1 if not known.
-
printStackTrace
Prints the stack trace to the specified stream.- Overrides:
printStackTrace
in classThrowable
- Parameters:
stream
- the output stream.
-
toString
Override toString to pick up any embedded exception.- Overrides:
toString
in classSAXException
- Returns:
- A string representation of this exception.
-
printStackTrace
Prints the stack trace to the specified writer.- Overrides:
printStackTrace
in classThrowable
- Parameters:
writer
- the writer.
-