Package ptolemy.graph
Class GraphException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ptolemy.graph.GraphException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
GraphConstructionException
,GraphElementException
,GraphStateException
,GraphTopologyException
,GraphWeightException
public class GraphException extends java.lang.RuntimeException
Base exception for graph errors. This is also an instance ofRuntimeException
.- Since:
- Ptolemy II 2.1
- Version:
- $Id$
- Author:
- Mingyung Ko, Shuvra S. Bhattacharyya
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- Red (ssb)
- Pt.ProposedRating:
- Red (myko)
-
-
Constructor Summary
Constructors Constructor Description GraphException()
The default constructor without arguments.GraphException(java.lang.String message)
Constructor with an argument of text description.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
_elementDump(java.lang.Object element, Graph graph, java.lang.String elementDescriptor)
static java.lang.String
elementDump(Element element, Graph graph)
Return a dump of a graph element and the container graph suitable to be appended to an error message.static java.lang.String
graphDump(Graph graph)
Return a dump of this graph suitable to be appended to an error message.static java.lang.String
weightDump(java.lang.Object weight)
Return a dump of a weight and the container graph suitable to be appended to an error message.
-
-
-
Method Detail
-
graphDump
public static java.lang.String graphDump(Graph graph)
Return a dump of this graph suitable to be appended to an error message.- Parameters:
graph
- The graph to dump.- Returns:
- A text string dump of the graph.
-
elementDump
public static java.lang.String elementDump(Element element, Graph graph)
Return a dump of a graph element and the container graph suitable to be appended to an error message.- Parameters:
element
- The element to dump.graph
- The graph where the element resides.- Returns:
- A text string dump of the element and graph.
-
weightDump
public static java.lang.String weightDump(java.lang.Object weight)
Return a dump of a weight and the container graph suitable to be appended to an error message. Generally, anelementDump(Element, Graph)
follows.- Parameters:
weight
- The weight to dump.- Returns:
- A text string dump of the weight and graph.
-
_elementDump
protected static java.lang.String _elementDump(java.lang.Object element, Graph graph, java.lang.String elementDescriptor)
Return a dump of an element (Node
,Edge
, or weight) and the container graph suitable to be appended to an error message.- Parameters:
element
- The element to dump.graph
- The container graph.elementDescriptor
- Descriptor of the element.- Returns:
- A text string dump of the element and graph.
-
-