com.novell.nds.dirxml.shimhost
Class XMLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.novell.nds.dirxml.shimhost.ConfigException
              extended bycom.novell.nds.dirxml.shimhost.XMLException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AttributeValueException, ElementContentException, MissingAttributeException, MissingElementException

public class XMLException
extends ConfigException

Base class for exceptions caused by XML parsing. Given a DOM Node that is an implementation of com.novell.xml.dom.NodeImpl, and assuming that URI and line number information has been set on the NodeImpl, then this class will report XML document location information as part of the detail message.

See Also:
Serialized Form

Field Summary
protected static String BAD_ATTRIBUTE_VALUE
           
protected static String BAD_BASE64
           
protected static String BAD_ELEMENT_CONTENT
           
protected  int columnNumber
          Column number of error location in XML document, if not equal to -1
protected  int lineNumber
          Line number of error location in XML document, if not equal to -1
protected  String locationURI
          Base URI of XML document if not null
protected static LocalizedMessageSource messageSource
           
protected static String MSG_FORMAT
           
protected static String MSG_FORMAT_COL
           
protected static String MSG_MISSING_ATTRIBUTE
           
protected static String MSG_MISSING_ELEMENT
           
 
Constructor Summary
XMLException(String detail, Node location)
          Constuct an XMLException with the passed detail message and location information from the passed DOM Node.
XMLException(String msgTag, Object[] msgParms, Node location)
          Constuct an XMLException with the passed detail message and location information from the passed DOM Node.
XMLException(String msgTag, Object[] msgParms, Throwable cause, Node location)
          Constuct an XMLException with the passed detail message, cause, and location information from the passed DOM Node.
XMLException(String detail, Throwable cause, Node location)
          Constuct an XMLException with the passed detail message, cause, and location information from the passed DOM Node.
XMLException(Throwable cause, Node location)
          Constuct an XMLException with the passed cause and location information from the passed DOM Node.
 
Method Summary
 String getMessage()
          Get the detail message for this XMLException.
protected  void setLocation(Node location)
          Get location information from a DOM Node, if possible.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageSource

protected static LocalizedMessageSource messageSource

MSG_FORMAT

protected static final String MSG_FORMAT
See Also:
Constant Field Values

MSG_FORMAT_COL

protected static final String MSG_FORMAT_COL
See Also:
Constant Field Values

MSG_MISSING_ELEMENT

protected static final String MSG_MISSING_ELEMENT
See Also:
Constant Field Values

MSG_MISSING_ATTRIBUTE

protected static final String MSG_MISSING_ATTRIBUTE
See Also:
Constant Field Values

BAD_ATTRIBUTE_VALUE

protected static final String BAD_ATTRIBUTE_VALUE
See Also:
Constant Field Values

BAD_BASE64

protected static final String BAD_BASE64
See Also:
Constant Field Values

BAD_ELEMENT_CONTENT

protected static final String BAD_ELEMENT_CONTENT
See Also:
Constant Field Values

locationURI

protected String locationURI
Base URI of XML document if not null


lineNumber

protected int lineNumber
Line number of error location in XML document, if not equal to -1


columnNumber

protected int columnNumber
Column number of error location in XML document, if not equal to -1

Constructor Detail

XMLException

public XMLException(String detail,
                    Node location)
Constuct an XMLException with the passed detail message and location information from the passed DOM Node.

Parameters:
detail - message
location - Node from which to obtain XML document location information.

XMLException

public XMLException(String detail,
                    Throwable cause,
                    Node location)
Constuct an XMLException with the passed detail message, cause, and location information from the passed DOM Node.

Parameters:
detail - message
cause - underlying cause of error
location - Node from which to obtain XML document location information.

XMLException

public XMLException(Throwable cause,
                    Node location)
Constuct an XMLException with the passed cause and location information from the passed DOM Node.

Parameters:
cause - underlying cause of error
location - Node from which to obtain XML document location information.

XMLException

public XMLException(String msgTag,
                    Object[] msgParms,
                    Node location)
Constuct an XMLException with the passed detail message and location information from the passed DOM Node.

Parameters:
msgTag - message tag in XMLException properties
msgParms - parameters for message
location - Node from which to obtain XML document location information.

XMLException

public XMLException(String msgTag,
                    Object[] msgParms,
                    Throwable cause,
                    Node location)
Constuct an XMLException with the passed detail message, cause, and location information from the passed DOM Node.

Parameters:
msgTag - message tag in XMLException properties
msgParms - parameters for message
cause - underlying cause of error
location - Node from which to obtain XML document location information.
Method Detail

getMessage

public String getMessage()
Get the detail message for this XMLException. If there is location information available the detail message will include the location information.

Returns:
detail message

setLocation

protected void setLocation(Node location)
Get location information from a DOM Node, if possible.

Parameters:
location - DOM Node