Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.xml.sax.SAXException
org.pentaho.reporting.libraries.xmlns.parser.ParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NoRootHandlerException
A parse exception. This does the same as the SAXParseException, but it
also prints the parent exception.
- Author:
- Thomas Morgner
- See Also:
-
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 message, Exception e) Creates a new ParseException with the given message and root exception.ParseException(String message, 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 TypeMethodDescriptionintReturns the column of the parse position where the error occured.intgetLine()Returns the line of the parse position where the error occured.Modifies the message to give more detailed location information.voidprintStackTrace(PrintStream stream) Prints the stack trace to the specified stream.voidprintStackTrace(PrintWriter writer) Prints the stack trace to the specified writer.toString()Override toString to pick up any embedded exception.Methods inherited from class SAXException
getCause, getExceptionMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace
-
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
-
ParseException
-
ParseException
-
ParseException
-
-
Method Details
-
getMessage
Modifies the message to give more detailed location information.- Overrides:
getMessagein classSAXException- Returns:
- the modified exception message.
-
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:
printStackTracein classThrowable- Parameters:
stream- the output stream.
-
toString
Override toString to pick up any embedded exception.- Overrides:
toStringin classSAXException- Returns:
- A string representation of this exception.
-
printStackTrace
Prints the stack trace to the specified writer.- Overrides:
printStackTracein classThrowable- Parameters:
writer- the writer.
-