package rpi.goldsd.graph;

/**
 * The <tt>InAnotherGraphException</tt> class represents an exception that
 * should be thrown when either a vertex or an edge is in a given graph
 * <tt>G</tt>, yet the <tt>add()</tt> method is used to add the vertex or
 * edge to a different graph <tt>H</tt>.
 *
 * @version 2.0, 3/28/98
 * @author David Goldschmidt
 */
public class InAnotherGraphException extends RuntimeException
{
  /**
   * The default constructor simply calls the default constructor
   * of the parent class <tt>RuntimeException</tt>.
   */
  public InAnotherGraphException()  { super(); }


  /**
   * This constructor calls the corresponding constructor of the
   * parent class <tt>RuntimeException</tt> with the <tt>String</tt>
   * argument to be displayed.
   * @param s the <tt>String</tt> object to be displayed.
   */
  public InAnotherGraphException( String s )  { super( s ); }
}

