javax.xml.transform

Class TransformerException

public class TransformerException extends Exception

An exception occurred during the transformation process.
Constructor Summary
TransformerException(String msg)
Constructor with a detail message.
TransformerException(Throwable cause)
Constructor with an underlying cause.
TransformerException(String msg, Throwable cause)
Constructor with a detail message and underlying cause.
TransformerException(String msg, SourceLocator locator)
Constructor with a detail message and locator.
TransformerException(String msg, SourceLocator locator, Throwable cause)
Constructor with detail message, locator and underlying cause.
Method Summary
ThrowablegetCause()
Returns the underlying cause of this exception.
ThrowablegetException()
Returns the underlying cause of this exception.
StringgetLocationAsString()
Returns the location information as a string.
SourceLocatorgetLocator()
Returns a locator indicating where the error occurred.
StringgetMessageAndLocation()
Returns the exception message with location information appended.
ThrowableinitCause(Throwable cause)
Initializes the root cause of this exception.
voidprintStackTrace()
voidprintStackTrace(PrintStream s)
voidprintStackTrace(PrintWriter s)
voidsetLocator(SourceLocator location)
Sets the locator indicating where the error occurred.

Constructor Detail

TransformerException

public TransformerException(String msg)
Constructor with a detail message.

TransformerException

public TransformerException(Throwable cause)
Constructor with an underlying cause.

TransformerException

public TransformerException(String msg, Throwable cause)
Constructor with a detail message and underlying cause.

TransformerException

public TransformerException(String msg, SourceLocator locator)
Constructor with a detail message and locator.

TransformerException

public TransformerException(String msg, SourceLocator locator, Throwable cause)
Constructor with detail message, locator and underlying cause.

Method Detail

getCause

public Throwable getCause()
Returns the underlying cause of this exception.

getException

public Throwable getException()
Returns the underlying cause of this exception.

getLocationAsString

public String getLocationAsString()
Returns the location information as a string.

getLocator

public SourceLocator getLocator()
Returns a locator indicating where the error occurred.

getMessageAndLocation

public String getMessageAndLocation()
Returns the exception message with location information appended.

initCause

public Throwable initCause(Throwable cause)
Initializes the root cause of this exception. This method may be called only once, and will be called by the constructor if a non-null cause is specified. Really phenomenally poor API design.

Parameters: cause the underlying cause

Throws: IllegalArgumentException if this exception is passed as the argument IllegalStateException if a cause has already been initialized

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(PrintStream s)

printStackTrace

public void printStackTrace(PrintWriter s)

setLocator

public void setLocator(SourceLocator location)
Sets the locator indicating where the error occurred.