com.lowagie.text

Class DocumentException

public class DocumentException extends Exception

Signals that an error has occurred in a Document.

See Also: BadElementException Document DocWriter DocListener

Field Summary
Exceptionex
static longserialVersionUID
Constructor Summary
DocumentException(Exception ex)
Creates a Document exception.
DocumentException()
Constructs a DocumentException without a message.
DocumentException(String message)
Constructs a DocumentException 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

serialVersionUID

private static final long serialVersionUID

Constructor Detail

DocumentException

public DocumentException(Exception ex)
Creates a Document exception.

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

DocumentException

public DocumentException()
Constructs a DocumentException without a message.

DocumentException

public DocumentException(String message)
Constructs a DocumentException 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