|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
edu.unm.cs.cs351.tdrl.f09.p1.GraphStructureException
public class GraphStructureException
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.
| 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 |
|---|
public GraphStructureException()
public GraphStructureException(String msg,
Throwable cause)
GraphStructureException(String) and
GraphStructureException(Throwable) -- generate an exception with both an
informative message and an original root cause.
msg - String describing the cause of the exceptioncause - Exception that originally caused the whole messpublic GraphStructureException(String msg)
msg - String describing the cause of the exceptionpublic GraphStructureException(Throwable cause)
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.
cause - Exception that originally caused the whole mess
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||