Source of EmptyStackException.java


  1: // Fig. 18.9: EmptyStackException.java
  2: // Indicates a stack is full.
  3: public class EmptyStackException extends RuntimeException
  4: {
  5:    // no-argument constructor
  6:    public EmptyStackException()
  7:    {
  8:       this( "Stack is empty" );
  9:    } // end no-argument EmptyStackException constructor 
 10: 
 11:    // one-argument constructor
 12:    public EmptyStackException( String exception )
 13:    {
 14:       super( exception );
 15:    } // end one-argument EmptyStackException constructor
 16: } // end class EmptyStackException
 17: 
 18: 
 19: /**************************************************************************
 20:  * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and               *
 21:  * Pearson Education, Inc. All Rights Reserved.                           *
 22:  *                                                                        *
 23:  * DISCLAIMER: The authors and publisher of this book have used their     *
 24:  * best efforts in preparing the book. These efforts include the          *
 25:  * development, research, and testing of the theories and programs        *
 26:  * to determine their effectiveness. The authors and publisher make       *
 27:  * no warranty of any kind, expressed or implied, with regard to these    *
 28:  * programs or to the documentation contained in these books. The authors *
 29:  * and publisher shall not be liable in any event for incidental or       *
 30:  * consequential damages in connection with, or arising out of, the       *
 31:  * furnishing, performance, or use of these programs.                     *
 32:  *************************************************************************/