Package org.apache.fop.apps
Class FOPException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.xml.sax.SAXException
org.apache.fop.apps.FOPException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PropertyException,ValidationException
Exception thrown when FOP has a problem.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFOPException(Exception cause) Constructs a new FOP exception with the specified cause.FOPException(String message) Constructs a new FOP exception with the specified detail message.FOPException(String message, Exception cause) Constructs a new exception with the specified detail message and cause.FOPException(String message, String systemId, int line, int column) Constructs a new FOP exception with the specified detail message and location.FOPException(String message, Locator locator) Constructs a new FOP exception with the specified detail message and location. -
Method Summary
Modifier and TypeMethodDescriptionReturns the detail message string of this FOP exception.protected ThrowableAttempts to recast the exception as other Throwable types.booleanIndicate whether a location was set.voidPrints this FOP exception and its backtrace to the standard error stream.voidprintStackTrace(PrintStream stream) Prints this FOP exception and its backtrace to the specified print stream.voidprintStackTrace(PrintWriter writer) Prints this FOP exception and its backtrace to the specified print writer.voidSets the localized message for this exception.voidsetLocation(String systemId, int line, int column) Set a location associated with the exception.voidsetLocator(Locator locator) Set a location associated with the exception.Methods inherited from class org.xml.sax.SAXException
getCause, getException, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getStackTrace, getSuppressed, initCause, setStackTrace
-
Constructor Details
-
FOPException
Constructs a new FOP exception with the specified detail message.- Parameters:
message- the detail message.
-
FOPException
Constructs a new FOP exception with the specified detail message and location.- Parameters:
message- the detail messagesystemId- 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
Constructs a new FOP exception with the specified detail message and location.- Parameters:
message- the detail message.locator- the locator holding the location.
-
FOPException
Constructs a new FOP exception with the specified cause.- Parameters:
cause- the cause.
-
FOPException
Constructs a new exception with the specified detail message and cause.- Parameters:
message- the detail messagecause- the cause
-
-
Method Details
-
setLocator
Set a location associated with the exception.- Parameters:
locator- the locator holding the location.
-
setLocation
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
Returns the detail message string of this FOP exception. If a location was set, the message is prepended with it in the formSystemId:LL:CC: &the message&
(the format used by most GNU tools)- Overrides:
getMessagein classSAXException- Returns:
- the detail message string of this FOP exception
-
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:
printStackTracein classThrowable
-
printStackTrace
Prints this FOP exception and its backtrace to the specified print stream.- Overrides:
printStackTracein classThrowable- Parameters:
stream- PrintStream to use for output
-
printStackTrace
Prints this FOP exception and its backtrace to the specified print writer.- Overrides:
printStackTracein classThrowable- Parameters:
writer- PrintWriter to use for output
-
setLocalizedMessage
Sets the localized message for this exception.- Parameters:
msg- the localized message
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classThrowable
-