ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.xmlconfig
Class ParamReadException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by umontreal.iro.lecuyer.xmlconfig.ParamReadException
All Implemented Interfaces:
Serializable

public class ParamReadException
extends RuntimeException

This exception is thrown when a problem happens when converting a DOM document into a tree of parameter objects.

See Also:
Serialized Form

Constructor Summary
ParamReadException()
          Constructs a new parameter reading exception with no message and no node.
ParamReadException(Node node)
          Constructs a new parameter reading exception with no message and the node node.
ParamReadException(Node node, String message)
          Constructs a new parameter reading exception with the given message and the node node.
ParamReadException(String message)
          Constructs a new parameter reading exception with the given message.
 
Method Summary
 Node getNode()
          Returns the DOM node in which the exception happened.
 String toString()
          Returns a short description of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParamReadException

public ParamReadException()
Constructs a new parameter reading exception with no message and no node.


ParamReadException

public ParamReadException(Node node)
Constructs a new parameter reading exception with no message and the node node.

Parameters:
node - the node the exception happened into.

ParamReadException

public ParamReadException(String message)
Constructs a new parameter reading exception with the given message.

Parameters:
message - the error message describing the exception.

ParamReadException

public ParamReadException(Node node,
                          String message)
Constructs a new parameter reading exception with the given message and the node node.

Parameters:
node - the node the exception happened into.
message - the error message describing the exception.
Method Detail

getNode

public Node getNode()
Returns the DOM node in which the exception happened. If no node was associated with this exception, this returns null.

Returns:
the node in which the exception happened, or null.

toString

public String toString()
Returns a short description of this exception. If no DOM node is associated with the exception, this calls the base class's toString method. Otherwise, a string containing the following elements is constructed and returned. The node information depends on its type. For an element, the formatted node name is given. For an attribute, the name, value and owner element formatted name are given. For a text node, the contents of the node is returned, as well as the formatted name of its parent, are given. For a generic node, the name and value are returned. All node names are formatted using DOMUtils.formatNodeName(org.w3c.dom.Node) and values are formatted using DOMUtils.formatNodeValue(org.w3c.dom.Node, int) with a maximal length of 100.

Overrides:
toString in class Throwable
Returns:
the short string describing the exception.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.