com.lowagie.text.rtf.parser.exceptions

Class RtfParserException

public class RtfParserException extends Exception

RtfParserException is the exception object thrown by the parser

Since: 2.0.8

Author: Howard Shank (hgshank@yahoo.com)

Field Summary
Exceptionex
Contained inner exception object.
static longserialVersionUID
Constructor Summary
RtfParserException(Exception ex)
Creates a RtfParserException object.
RtfParserException()
Constructs a RtfParserException whithout a message.
RtfParserException(String message)
Constructs a RtfParserException with a message.
Method Summary
StringgetLocalizedMessage()
and make sure we also produce a localized version
StringgetMessage()
We print the message of the checked exception
voidprintStackTrace()
we have to override this as well
voidprintStackTrace(PrintStream s)
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"
voidprintStackTrace(PrintWriter s)
Again, we prefix the stack trace with "ExceptionConverter:"
static Stringsplit(String s)
Removes everything in a String that comes before a '.'
StringtoString()
The toString() is changed to be prefixed with ExceptionConverter

Field Detail

ex

private Exception ex
Contained inner exception object.

serialVersionUID

private static final long serialVersionUID

Constructor Detail

RtfParserException

public RtfParserException(Exception ex)
Creates a RtfParserException object.

Parameters: ex an exception that has to be turned into a RtfParserException

RtfParserException

public RtfParserException()
Constructs a RtfParserException whithout a message.

RtfParserException

public RtfParserException(String message)
Constructs a RtfParserException with a message.

Parameters: message a message describing the exception

Method Detail

getLocalizedMessage

public String getLocalizedMessage()
and make sure we also produce a localized version

Returns: a localized message

getMessage

public String getMessage()
We print the message of the checked exception

Returns: the error message

printStackTrace

public void printStackTrace()
we have to override this as well

printStackTrace

public void printStackTrace(PrintStream s)
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"

Parameters: s a printstream object

printStackTrace

public void printStackTrace(PrintWriter s)
Again, we prefix the stack trace with "ExceptionConverter:"

Parameters: s A PrintWriter object

split

private static String split(String s)
Removes everything in a String that comes before a '.'

Parameters: s the original string

Returns: the part that comes after the dot

toString

public String toString()
The toString() is changed to be prefixed with ExceptionConverter

Returns: the String version of the exception