facets.util.datatree
Class ExceptionNode

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.StatefulCore
          extended by facets.util.datatree.TypedNode<java.lang.String>
              extended by facets.util.datatree.DataNode
                  extended by facets.util.datatree.ExceptionNode
All Implemented Interfaces:
Identified, Stateful, Titled, java.io.Serializable

public final class ExceptionNode
extends DataNode

Wraps an exception in a DataNode.

ExceptionNode enables the graceful handling of almost any exception thrown during construction of a tree of TypedNodes. The exception can be caught by returning it wrapped in an ExceptionNode, allowing execution to continue while ensuring that the exception is recorded.

Typically the ExceptionNode is eventually displayed in a tree viewer, facilitating debugging.

See Also:
Serialized Form

Field Summary
static boolean alertExceptions
          If set to true, the exception passed to the constructor is rethrown.
static boolean throwExceptions
          If set to true, the exception passed to the constructor is rethrown.
static java.lang.Object TYPE
           
 
Fields inherited from class facets.util.datatree.TypedNode
NULL_NODE, UNTITLED
 
Constructor Summary
ExceptionNode(java.lang.Exception e)
           
ExceptionNode(java.lang.Exception e, TypedNode[] detail)
           
 
Method Summary
 
Methods inherited from class facets.util.datatree.DataNode
contents, copyState, setChildren, setContents, setState, setValues, stateEquals, toString, valueString
 
Methods inherited from class facets.util.datatree.TypedNode
children, identity, parent, setParent, setValidType, type, values
 
Methods inherited from class facets.util.StatefulCore
setTitle, stateStamp, title, updateStateStamp
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.Object TYPE

throwExceptions

public static boolean throwExceptions
If set to true, the exception passed to the constructor is rethrown.


alertExceptions

public static boolean alertExceptions
If set to true, the exception passed to the constructor is rethrown.

Constructor Detail

ExceptionNode

public ExceptionNode(java.lang.Exception e)

ExceptionNode

public ExceptionNode(java.lang.Exception e,
                     TypedNode[] detail)