Class DocumentException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.gitlab.pdftk_java.com.lowagie.text.DocumentException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadElementException, PdfException

public class DocumentException extends Exception
Signals that an error has occurred in a Document.
See Also:
  • Field Details

  • Constructor Details

    • 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 whithout a message.
    • DocumentException

      public DocumentException(String message)
      Constructs a DocumentException with a message.
      Parameters:
      message - a message describing the exception
  • Method Details

    • 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