ptolemy.graph
Class GraphWeightException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by ptolemy.graph.GraphException
                  extended by ptolemy.graph.GraphWeightException
All Implemented Interfaces:
java.io.Serializable

public class GraphWeightException
extends GraphException

Exception for unweighted graphs or graphs with improper weights. This exception can also be thrown due to accessing elements with incorrect weights.

Since:
Ptolemy II 2.1
Version:
$Id: GraphWeightException.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Mingyung Ko
See Also:
Serialized Form
Accepted Rating:
Red (ssb)
Proposed Rating:
Red (myko)

Constructor Summary
GraphWeightException(java.lang.Object weight, Element element, Graph graph, java.lang.String message)
          Constructor with arguments of weight, element, graph, and a message.
GraphWeightException(java.lang.String message)
          Constructor for a given message.
 
Method Summary
private static java.lang.String _argumentsToString(java.lang.Object weight, Element element, Graph graph, java.lang.String message)
           
 
Methods inherited from class ptolemy.graph.GraphException
_elementDump, elementDump, graphDump, weightDump
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphWeightException

public GraphWeightException(java.lang.String message)
Constructor for a given message.

Parameters:
message - The message.

GraphWeightException

public GraphWeightException(java.lang.Object weight,
                            Element element,
                            Graph graph,
                            java.lang.String message)
Constructor with arguments of weight, element, graph, and a message. This exception is generally thrown because of invalid weight association to a specific element. It can also be thrown for unspecific elements by setting the element argument to null.

Parameters:
weight - The invalid weight.
element - The element to associate the invalid weight. Set null for unspecific elements.
graph - The graph accessed.
message - The exception message.
Method Detail

_argumentsToString

private static java.lang.String _argumentsToString(java.lang.Object weight,
                                                   Element element,
                                                   Graph graph,
                                                   java.lang.String message)