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
RtfParserException
is the exception object thrown by
the parser- Since:
- 2.0.8
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Exception
Contained inner exception object.private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aRtfParserException
whithout a message.Creates a RtfParserException object.RtfParserException
(String message) Constructs aRtfParserException
with a message. -
Method Summary
Modifier and TypeMethodDescriptionand make sure we also produce a localized versionWe print the message of the checked exceptionvoid
we have to override this as wellvoid
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"void
Again, we prefix the stack trace with "ExceptionConverter:"private static String
Removes everything in a String that comes before a '.'toString()
The toString() is changed to be prefixed with ExceptionConverterMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ex
Contained inner exception object.
-
-
Constructor Details
-
RtfParserException
Creates a RtfParserException object.- Parameters:
ex
- an exception that has to be turned into a RtfParserException
-
RtfParserException
public RtfParserException()Constructs aRtfParserException
whithout a message. -
RtfParserException
Constructs aRtfParserException
with a message.- Parameters:
message
- a message describing the exception
-
-
Method Details
-
getMessage
We print the message of the checked exception- Overrides:
getMessage
in classThrowable
- Returns:
- the error message
-
getLocalizedMessage
and make sure we also produce a localized version- Overrides:
getLocalizedMessage
in classThrowable
- Returns:
- a localized message
-
toString
The toString() is changed to be prefixed with ExceptionConverter -
printStackTrace
public void printStackTrace()we have to override this as well- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"- Overrides:
printStackTrace
in classThrowable
- Parameters:
s
- a printstream object
-
printStackTrace
Again, we prefix the stack trace with "ExceptionConverter:"- Overrides:
printStackTrace
in classThrowable
- Parameters:
s
- A PrintWriter object
-
split
Removes everything in a String that comes before a '.'- Parameters:
s
- the original string- Returns:
- the part that comes after the dot
-