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

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              com.lowagie.text.rtf.parser.exceptions.RtfParserException

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  RtfUnknownCtrlWordException

    public class RtfParserException

extends Exception

`RtfParserException` is the exception object thrown by the parser

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

Field Summary
`private Exception` `ex` Contained inner exception object.
`private static long` `serialVersionUID`

Constructor Summary
`RtfParserException()` Constructs a `RtfParserException` whithout a message.
`RtfParserException(Exception ex)` Creates a RtfParserException object.
`RtfParserException(String message)` Constructs a `RtfParserException` with a message.

Method Summary
`String` `getLocalizedMessage()` and make sure we also produce a localized version
`String` `getMessage()` We print the message of the checked exception
`void` `printStackTrace()` we have to override this as well
`void` `printStackTrace(PrintStream s)` here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"
`void` `printStackTrace(PrintWriter s)` Again, we prefix the stack trace with "ExceptionConverter:"
`private static String` `split(String s)` Removes everything in a String that comes before a '.'
`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`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

See Also:
  Constant Field Values

### ex

    private Exception ex

  Contained inner exception object.

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

### getMessage

    public String getMessage()

  We print the message of the checked exception

  Overrides:
    `getMessage` in class `Throwable`
  Returns:
    the error message

### getLocalizedMessage

    public String getLocalizedMessage()

  and make sure we also produce a localized version

  Overrides:
    `getLocalizedMessage` in class `Throwable`
  Returns:
    a localized message

### toString

    public String toString()

  The toString() is changed to be prefixed with ExceptionConverter

  Overrides:
    `toString` in class `Throwable`
  Returns:
    the String version of the exception

### printStackTrace

    public void printStackTrace()

  we have to override this as well

  Overrides:
    `printStackTrace` in class `Throwable`

### printStackTrace

    public void printStackTrace(PrintStream s)

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

  Overrides:
    `printStackTrace` in class `Throwable`
  Parameters:
    `s` - a printstream object

### printStackTrace

    public void printStackTrace(PrintWriter s)

  Again, we prefix the stack trace with "ExceptionConverter:"

  Overrides:
    `printStackTrace` in class `Throwable`
  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

Hosted by Hostbasket