javax.xml.transform
Class TransformerException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by javax.xml.transform.TransformerException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
TransformerConfigurationException sample code for javax.xml.transform.TransformerConfigurationException definition code for javax.xml.transform.TransformerConfigurationException

public class TransformerException
extends Exception sample code for java.lang.Exception definition code for java.lang.Exception

This class specifies an exceptional condition that occured during the transformation process.

See Also:
Serialized Form

Constructor Summary
TransformerException sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.String) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  message)
          Create a new TransformerException.
TransformerException sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, javax.xml.transform.SourceLocator) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, javax.xml.transform.SourceLocator) (String sample code for java.lang.String definition code for java.lang.String  message, SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  locator)
          Create a new TransformerException from a message and a Locator.
TransformerException sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable) (String sample code for java.lang.String definition code for java.lang.String  message, SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  locator, Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
          Wrap an existing exception in a TransformerException.
TransformerException sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, java.lang.Throwable) (String sample code for java.lang.String definition code for java.lang.String  message, Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
          Wrap an existing exception in a TransformerException.
TransformerException sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
          Create a new TransformerException wrapping an existing exception.
 
Method Summary
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable getCause sample code for javax.xml.transform.TransformerException.getCause() definition code for javax.xml.transform.TransformerException.getCause() ()
          Returns the cause of this throwable or null if the cause is nonexistent or unknown.
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable getException sample code for javax.xml.transform.TransformerException.getException() definition code for javax.xml.transform.TransformerException.getException() ()
          This method retrieves an exception that this exception wraps.
 String sample code for java.lang.String definition code for java.lang.String getLocationAsString sample code for javax.xml.transform.TransformerException.getLocationAsString() definition code for javax.xml.transform.TransformerException.getLocationAsString() ()
          Get the location information as a string.
 SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator getLocator sample code for javax.xml.transform.TransformerException.getLocator() definition code for javax.xml.transform.TransformerException.getLocator() ()
          Method getLocator retrieves an instance of a SourceLocator object that specifies where an error occured.
 String sample code for java.lang.String definition code for java.lang.String getMessageAndLocation sample code for javax.xml.transform.TransformerException.getMessageAndLocation() definition code for javax.xml.transform.TransformerException.getMessageAndLocation() ()
          Get the error message with location information appended.
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable initCause sample code for javax.xml.transform.TransformerException.initCause(java.lang.Throwable) definition code for javax.xml.transform.TransformerException.initCause(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Initializes the cause of this throwable to the specified value.
 void printStackTrace sample code for javax.xml.transform.TransformerException.printStackTrace() definition code for javax.xml.transform.TransformerException.printStackTrace() ()
          Print the the trace of methods from where the error originated.
 void printStackTrace sample code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintStream) definition code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintStream) (PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream  s)
          Print the the trace of methods from where the error originated.
 void printStackTrace sample code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintWriter) definition code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintWriter) (PrintWriter sample code for java.io.PrintWriter definition code for java.io.PrintWriter  s)
          Print the the trace of methods from where the error originated.
 void setLocator sample code for javax.xml.transform.TransformerException.setLocator(javax.xml.transform.SourceLocator) definition code for javax.xml.transform.TransformerException.setLocator(javax.xml.transform.SourceLocator) (SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  location)
          Method setLocator sets an instance of a SourceLocator object that specifies where an error occured.
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) , toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

TransformerException sample code for javax.xml.transform.TransformerException(java.lang.String) definition code for javax.xml.transform.TransformerException(java.lang.String)

public TransformerException(String sample code for java.lang.String definition code for java.lang.String  message)
Create a new TransformerException.

Parameters:
message - The error or warning message.

TransformerException sample code for javax.xml.transform.TransformerException(java.lang.Throwable) definition code for javax.xml.transform.TransformerException(java.lang.Throwable)

public TransformerException(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
Create a new TransformerException wrapping an existing exception.

Parameters:
e - The exception to be wrapped.

TransformerException sample code for javax.xml.transform.TransformerException(java.lang.String, java.lang.Throwable) definition code for javax.xml.transform.TransformerException(java.lang.String, java.lang.Throwable)

public TransformerException(String sample code for java.lang.String definition code for java.lang.String  message,
                            Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
Wrap an existing exception in a TransformerException.

This is used for throwing processor exceptions before the processing has started.

Parameters:
message - The error or warning message, or null to use the message from the embedded exception.
e - Any exception

TransformerException sample code for javax.xml.transform.TransformerException(java.lang.String, javax.xml.transform.SourceLocator) definition code for javax.xml.transform.TransformerException(java.lang.String, javax.xml.transform.SourceLocator)

public TransformerException(String sample code for java.lang.String definition code for java.lang.String  message,
                            SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  locator)
Create a new TransformerException from a message and a Locator.

This constructor is especially useful when an application is creating its own exception from within a DocumentHandler callback.

Parameters:
message - The error or warning message.
locator - The locator object for the error or warning.

TransformerException sample code for javax.xml.transform.TransformerException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable) definition code for javax.xml.transform.TransformerException(java.lang.String, javax.xml.transform.SourceLocator, java.lang.Throwable)

public TransformerException(String sample code for java.lang.String definition code for java.lang.String  message,
                            SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  locator,
                            Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
Wrap an existing exception in a TransformerException.

Parameters:
message - The error or warning message, or null to use the message from the embedded exception.
locator - The locator object for the error or warning.
e - Any exception
Method Detail

getLocator sample code for javax.xml.transform.TransformerException.getLocator() definition code for javax.xml.transform.TransformerException.getLocator()

public SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  getLocator()
Method getLocator retrieves an instance of a SourceLocator object that specifies where an error occured.

Returns:
A SourceLocator object, or null if none was specified.

setLocator sample code for javax.xml.transform.TransformerException.setLocator(javax.xml.transform.SourceLocator) definition code for javax.xml.transform.TransformerException.setLocator(javax.xml.transform.SourceLocator)

public void setLocator(SourceLocator sample code for javax.xml.transform.SourceLocator definition code for javax.xml.transform.SourceLocator  location)
Method setLocator sets an instance of a SourceLocator object that specifies where an error occured.

Parameters:
location - A SourceLocator object, or null to clear the location.

getException sample code for javax.xml.transform.TransformerException.getException() definition code for javax.xml.transform.TransformerException.getException()

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  getException()
This method retrieves an exception that this exception wraps.

Returns:
An Throwable object, or null.
See Also:
getCause() sample code for javax.xml.transform.TransformerException.getCause() definition code for javax.xml.transform.TransformerException.getCause()

getCause sample code for javax.xml.transform.TransformerException.getCause() definition code for javax.xml.transform.TransformerException.getCause()

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  getCause()
Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

Overrides:
getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
the cause of this throwable or null if the cause is nonexistent or unknown.

initCause sample code for javax.xml.transform.TransformerException.initCause(java.lang.Throwable) definition code for javax.xml.transform.TransformerException.initCause(java.lang.Throwable)

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  initCause(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with TransformerException(Throwable) sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.Throwable) or TransformerException(String,Throwable) sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, java.lang.Throwable) , this method cannot be called even once.

Overrides:
initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Parameters:
cause - the cause (which is saved for later retrieval by the getCause() sample code for javax.xml.transform.TransformerException.getCause() definition code for javax.xml.transform.TransformerException.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Returns:
a reference to this Throwable instance.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if cause is this throwable. (A throwable cannot be its own cause.)
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if this throwable was created with TransformerException(Throwable) sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.Throwable) or TransformerException(String,Throwable) sample code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, java.lang.Throwable) definition code for javax.xml.transform.TransformerException.TransformerException(java.lang.String, java.lang.Throwable) , or this method has already been called on this throwable.

getMessageAndLocation sample code for javax.xml.transform.TransformerException.getMessageAndLocation() definition code for javax.xml.transform.TransformerException.getMessageAndLocation()

public String sample code for java.lang.String definition code for java.lang.String  getMessageAndLocation()
Get the error message with location information appended.

Returns:
A String representing the error message with location information appended.

getLocationAsString sample code for javax.xml.transform.TransformerException.getLocationAsString() definition code for javax.xml.transform.TransformerException.getLocationAsString()

public String sample code for java.lang.String definition code for java.lang.String  getLocationAsString()
Get the location information as a string.

Returns:
A string with location info, or null if there is no location information.

printStackTrace sample code for javax.xml.transform.TransformerException.printStackTrace() definition code for javax.xml.transform.TransformerException.printStackTrace()

public void printStackTrace()
Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.

Overrides:
printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable

printStackTrace sample code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintStream) definition code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintStream)

public void printStackTrace(PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream  s)
Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.

Overrides:
printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Parameters:
s - The stream where the dump will be sent to.

printStackTrace sample code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintWriter) definition code for javax.xml.transform.TransformerException.printStackTrace(java.io.PrintWriter)

public void printStackTrace(PrintWriter sample code for java.io.PrintWriter definition code for java.io.PrintWriter  s)
Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.

Overrides:
printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Parameters:
s - The writer where the dump will be sent to.