com.lowagie.text.rtf.parser.exceptions
Class RtfParserException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.lowagie.text.rtf.parser.exceptions.RtfParserException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RtfUnknownCtrlWordException

public class RtfParserException
extends java.lang.Exception

RtfParserException is the exception object thrown by the parser

Since:
2.0.8
Author:
Howard Shank (hgshank@yahoo.com)
See Also:
Serialized Form

Constructor Summary
RtfParserException()
          Constructs a RtfParserException whithout a message.
RtfParserException(java.lang.Exception ex)
          Creates a RtfParserException object.
RtfParserException(java.lang.String message)
          Constructs a RtfParserException with a message.
 
Method Summary
 java.lang.String getLocalizedMessage()
          and make sure we also produce a localized version
 java.lang.String getMessage()
          We print the message of the checked exception
 void printStackTrace()
          we have to override this as well
 void printStackTrace(java.io.PrintStream s)
          here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"
 void printStackTrace(java.io.PrintWriter s)
          Again, we prefix the stack trace with "ExceptionConverter:"
 java.lang.String toString()
          The toString() is changed to be prefixed with ExceptionConverter
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RtfParserException

public RtfParserException(java.lang.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(java.lang.String message)
Constructs a RtfParserException with a message.

Parameters:
message - a message describing the exception
Method Detail

getMessage

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

Overrides:
getMessage in class java.lang.Throwable
Returns:
the error message

getLocalizedMessage

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

Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
a localized message

toString

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

Overrides:
toString in class java.lang.Throwable
Returns:
the String version of the exception

printStackTrace

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

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

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

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - a printstream object

printStackTrace

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

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - A PrintWriter object


iText 2.1.7