org.xml.sax
Class SAXException

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 org.xml.sax.SAXException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
SAXNotRecognizedException sample code for org.xml.sax.SAXNotRecognizedException definition code for org.xml.sax.SAXNotRecognizedException , SAXNotSupportedException sample code for org.xml.sax.SAXNotSupportedException definition code for org.xml.sax.SAXNotSupportedException , SAXParseException sample code for org.xml.sax.SAXParseException definition code for org.xml.sax.SAXParseException

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

Encapsulate a general SAX error or warning.

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

This class can contain basic error or warning information from either the XML parser or the application: a parser writer or application writer can subclass it to provide additional functionality. SAX handlers may throw this exception or any exception subclassed from it.

If the application needs to pass through other types of exceptions, it must wrap those exceptions in a SAXException or an exception derived from a SAXException.

If the parser or application needs to include information about a specific location in an XML document, it should use the SAXParseException sample code for org.xml.sax.SAXParseException definition code for org.xml.sax.SAXParseException subclass.

Since:
SAX 1.0
See Also:
SAXParseException sample code for org.xml.sax.SAXParseException definition code for org.xml.sax.SAXParseException , Serialized Form

Constructor Summary
SAXException sample code for org.xml.sax.SAXException.SAXException() definition code for org.xml.sax.SAXException.SAXException() ()
          Create a new SAXException.
SAXException sample code for org.xml.sax.SAXException.SAXException(java.lang.Exception) definition code for org.xml.sax.SAXException.SAXException(java.lang.Exception) (Exception sample code for java.lang.Exception definition code for java.lang.Exception  e)
          Create a new SAXException wrapping an existing exception.
SAXException sample code for org.xml.sax.SAXException.SAXException(java.lang.String) definition code for org.xml.sax.SAXException.SAXException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  message)
          Create a new SAXException.
SAXException sample code for org.xml.sax.SAXException.SAXException(java.lang.String, java.lang.Exception) definition code for org.xml.sax.SAXException.SAXException(java.lang.String, java.lang.Exception) (String sample code for java.lang.String definition code for java.lang.String  message, Exception sample code for java.lang.Exception definition code for java.lang.Exception  e)
          Create a new SAXException from an existing exception.
 
Method Summary
 Exception sample code for java.lang.Exception definition code for java.lang.Exception getException sample code for org.xml.sax.SAXException.getException() definition code for org.xml.sax.SAXException.getException() ()
          Return the embedded exception, if any.
 String sample code for java.lang.String definition code for java.lang.String getMessage sample code for org.xml.sax.SAXException.getMessage() definition code for org.xml.sax.SAXException.getMessage() ()
          Return a detail message for this exception.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for org.xml.sax.SAXException.toString() definition code for org.xml.sax.SAXException.toString() ()
          Override toString to pick up any embedded exception.
 
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() , getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
 
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

SAXException sample code for org.xml.sax.SAXException() definition code for org.xml.sax.SAXException()

public SAXException()
Create a new SAXException.


SAXException sample code for org.xml.sax.SAXException(java.lang.String) definition code for org.xml.sax.SAXException(java.lang.String)

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

Parameters:
message - The error or warning message.

SAXException sample code for org.xml.sax.SAXException(java.lang.Exception) definition code for org.xml.sax.SAXException(java.lang.Exception)

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

The existing exception will be embedded in the new one, and its message will become the default message for the SAXException.

Parameters:
e - The exception to be wrapped in a SAXException.

SAXException sample code for org.xml.sax.SAXException(java.lang.String, java.lang.Exception) definition code for org.xml.sax.SAXException(java.lang.String, java.lang.Exception)

public SAXException(String sample code for java.lang.String definition code for java.lang.String  message,
                    Exception sample code for java.lang.Exception definition code for java.lang.Exception  e)
Create a new SAXException from an existing exception.

The existing exception will be embedded in the new one, but the new exception will have its own message.

Parameters:
message - The detail message.
e - The exception to be wrapped in a SAXException.
Method Detail

getMessage sample code for org.xml.sax.SAXException.getMessage() definition code for org.xml.sax.SAXException.getMessage()

public String sample code for java.lang.String definition code for java.lang.String  getMessage()
Return a detail message for this exception.

If there is an embedded exception, and if the SAXException has no detail message of its own, this method will return the detail message from the embedded exception.

Overrides:
getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
The error or warning message.

getException sample code for org.xml.sax.SAXException.getException() definition code for org.xml.sax.SAXException.getException()

public Exception sample code for java.lang.Exception definition code for java.lang.Exception  getException()
Return the embedded exception, if any.

Returns:
The embedded exception, or null if there is none.

toString sample code for org.xml.sax.SAXException.toString() definition code for org.xml.sax.SAXException.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Override toString to pick up any embedded exception.

Overrides:
toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
A string representation of this exception.