javax.xml.transform

Class TransformerException

Known Direct Subclasses:
TransformerConfigurationException

public class TransformerException
extends Exception

An exception occurred during the transformation process.

Constructor Summary

TransformerException(String msg)
Constructor with a detail message.
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.
TransformerException(Throwable cause)
Constructor with an underlying cause.

Method Summary

Throwable
getCause()
Returns the underlying cause of this exception.
Throwable
getException()
Returns the underlying cause of this exception.
String
getLocationAsString()
Returns the location information as a string.
SourceLocator
getLocator()
Returns a locator indicating where the error occurred.
String
getMessageAndLocation()
Returns the exception message with location information appended.
Throwable
initCause(Throwable cause)
Initializes the root cause of this exception.
void
printStackTrace()
void
printStackTrace(PrintStream s)
void
printStackTrace(PrintWriter s)
void
setLocator(SourceLocator location)
Sets the locator indicating where the error occurred.

Constructor Details

TransformerException

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


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.


TransformerException

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

Method Details

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


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.