org.pentaho.reporting.libraries.xmlns.parser

Class ParseException

public class ParseException extends SAXException

A parse exception. This does the same as the SAXParseException, but it also prints the parent exception.

Author: Thomas Morgner

Constructor Summary
ParseException(String message)
Creates a new ParseException with the given message.
ParseException(Exception e)
Creates a new ParseException with the given root exception.
ParseException(String message, Exception e)
Creates a new ParseException with the given message and root exception.
ParseException(String message, Locator locator)
Creates a new ParseException with the given message and the locator.
ParseException(Exception e, Locator locator)
Creates a new ParseException with the given root exception and the locator.
ParseException(String message, Exception e, Locator locator)
Creates a new ParseException with the given message, root exception and the locator.
Method Summary
protected voidfillLocation(Locator locator)
Fills the location with the given locator.
intgetColumn()
Returns the column of the parse position where the error occured.
intgetLine()
Returns the line of the parse position where the error occured.
StringgetMessage()
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.
StringtoString()
Override toString to pick up any embedded exception.

Constructor Detail

ParseException

public ParseException(String message)
Creates a new ParseException with the given message.

Parameters: message the message

ParseException

public ParseException(Exception e)
Creates a new ParseException with the given root exception.

Parameters: e the exception

ParseException

public ParseException(String message, Exception e)
Creates a new ParseException with the given message and root exception.

Parameters: message the message e the exception

ParseException

public ParseException(String message, Locator locator)
Creates a new ParseException with the given message and the locator.

Parameters: message the message locator the locator of the parser

ParseException

public ParseException(Exception e, Locator locator)
Creates a new ParseException with the given root exception and the locator.

Parameters: e the exception locator the locator of the parser

ParseException

public ParseException(String message, Exception e, Locator locator)
Creates a new ParseException with the given message, root exception and the locator.

Parameters: message the message e the exception locator the locator of the parser

Method Detail

fillLocation

protected void fillLocation(Locator locator)
Fills the location with the given locator.

Parameters: locator the locator or null.

getColumn

public int getColumn()
Returns the column of the parse position where the error occured.

Returns: the column number or -1 if not known.

getLine

public int getLine()
Returns the line of the parse position where the error occured.

Returns: the line number or -1 if not known.

getMessage

public String getMessage()
Modifies the message to give more detailed location information.

Returns: the modified exception message.

printStackTrace

public void printStackTrace(PrintStream stream)
Prints the stack trace to the specified stream.

Parameters: stream the output stream.

printStackTrace

public void printStackTrace(PrintWriter writer)
Prints the stack trace to the specified writer.

Parameters: writer the writer.

toString

public String toString()
Override toString to pick up any embedded exception.

Returns: A string representation of this exception.