edu.unm.cs.cs351.tdrl.f10.p1
Class GraphStructureException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by edu.unm.cs.cs351.tdrl.f10.p1.GraphStructureException
All Implemented Interfaces:
Serializable

public class GraphStructureException
extends Exception

Exception indicating that a violation in graph structure has been detected (e.g., an edge missing a node on one end or a directed edge that should have been undirected or something like that). These exceptions are not necessarily fatal -- they just indicate that you attempted to access the graph in an illegal way.

Unlike the CrawlFatalException, this is a checked exception. It must be declared in the throws clause of every method that could generate one. And, of course, it should also be documented in the @throws field of the javadoc for any such method.

This class is only a marker class -- it exists for its name/type only. It does not add any functionality to (or modify any functionality of) the RuntimeException class. It contains only constructors that proxy up to the parent class.

Version:
1.0
Author:
terran
See Also:
Serialized Form

Constructor Summary
GraphStructureException()
          Construct a default Graph exception, with no information about why it was generated.
GraphStructureException(String msg)
          Construct a Graph exception with an informative message about why it was generated.
GraphStructureException(String msg, Throwable cause)
          A combination of GraphStructureException(String) and GraphStructureException(Throwable) -- generate an exception with both an informative message and an original root cause.
GraphStructureException(Throwable cause)
          Construct a Graph exception that "wraps" another, primary exception.
 
Method Summary
 
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

GraphStructureException

public GraphStructureException()
Construct a default Graph exception, with no information about why it was generated. This is discouraged.


GraphStructureException

public GraphStructureException(String msg,
                               Throwable cause)
A combination of GraphStructureException(String) and GraphStructureException(Throwable) -- generate an exception with both an informative message and an original root cause.

Parameters:
msg - String describing the cause of the exception
cause - Exception that originally caused the whole mess

GraphStructureException

public GraphStructureException(String msg)
Construct a Graph exception with an informative message about why it was generated.

Parameters:
msg - String describing the cause of the exception

GraphStructureException

public GraphStructureException(Throwable cause)
Construct a Graph exception that "wraps" another, primary exception. This constructor is used when the original cause of the Graph exception is that some other exception was generated. (For example, an IOException or somesuch.) You can then generate a Graph-oriented exception, but keep a record of why it was generated -- what the root cause was.

Parameters:
cause - Exception that originally caused the whole mess