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 ExceptionContained inner exception object.private static final long -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aRtfParserExceptionwhithout a message.Creates a RtfParserException object.RtfParserException(String message) Constructs aRtfParserExceptionwith a message. -
Method Summary
Modifier and TypeMethodDescriptionand make sure we also produce a localized versionWe print the message of the checked exceptionvoidwe have to override this as wellvoidhere we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"voidAgain, we prefix the stack trace with "ExceptionConverter:"private static StringRemoves 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 aRtfParserExceptionwhithout a message. -
RtfParserException
Constructs aRtfParserExceptionwith a message.- Parameters:
message- a message describing the exception
-
-
Method Details
-
getMessage
We print the message of the checked exception- Overrides:
getMessagein classThrowable- Returns:
- the error message
-
getLocalizedMessage
and make sure we also produce a localized version- Overrides:
getLocalizedMessagein 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:
printStackTracein classThrowable
-
printStackTrace
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"- Overrides:
printStackTracein classThrowable- Parameters:
s- a printstream object
-
printStackTrace
Again, we prefix the stack trace with "ExceptionConverter:"- Overrides:
printStackTracein 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
-