Class FOPException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PropertyException, ValidationException

public class FOPException extends SAXException
Exception thrown when FOP has a problem.
See Also:
  • Constructor Details

    • FOPException

      public FOPException(String message)
      Constructs a new FOP exception with the specified detail message.
      Parameters:
      message - the detail message.
    • FOPException

      public FOPException(String message, String systemId, int line, int column)
      Constructs a new FOP exception with the specified detail message and location.
      Parameters:
      message - the detail message
      systemId - the system id of the FO document which is associated with the exception may be null.
      line - line number in the FO document which is associated with the exception.
      column - clolumn number in the line which is associated with the exception.
    • FOPException

      public FOPException(String message, Locator locator)
      Constructs a new FOP exception with the specified detail message and location.
      Parameters:
      message - the detail message.
      locator - the locator holding the location.
    • FOPException

      public FOPException(Exception cause)
      Constructs a new FOP exception with the specified cause.
      Parameters:
      cause - the cause.
    • FOPException

      public FOPException(String message, Exception cause)
      Constructs a new exception with the specified detail message and cause.
      Parameters:
      message - the detail message
      cause - the cause
  • Method Details

    • setLocator

      public void setLocator(Locator locator)
      Set a location associated with the exception.
      Parameters:
      locator - the locator holding the location.
    • setLocation

      public void setLocation(String systemId, int line, int column)
      Set a location associated with the exception.
      Parameters:
      systemId - the system id of the FO document which is associated with the exception; may be null.
      line - line number in the FO document which is associated with the exception.
      column - column number in the line which is associated with the exception.
    • isLocationSet

      public boolean isLocationSet()
      Indicate whether a location was set.
      Returns:
      whether a location was set
    • getMessage

      public String getMessage()
      Returns the detail message string of this FOP exception. If a location was set, the message is prepended with it in the form
        SystemId:LL:CC: &the message&
       
      (the format used by most GNU tools)
      Overrides:
      getMessage in class SAXException
      Returns:
      the detail message string of this FOP exception
    • getRootException

      protected Throwable getRootException()
      Attempts to recast the exception as other Throwable types.
      Returns:
      the exception recast as another type if possible, otherwise null.
    • printStackTrace

      public void printStackTrace()
      Prints this FOP exception and its backtrace to the standard error stream.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintStream stream)
      Prints this FOP exception and its backtrace to the specified print stream.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      stream - PrintStream to use for output
    • printStackTrace

      public void printStackTrace(PrintWriter writer)
      Prints this FOP exception and its backtrace to the specified print writer.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      writer - PrintWriter to use for output
    • setLocalizedMessage

      public void setLocalizedMessage(String msg)
      Sets the localized message for this exception.
      Parameters:
      msg - the localized message
    • getLocalizedMessage

      public String getLocalizedMessage()
      Overrides:
      getLocalizedMessage in class Throwable