Source of SquareRootException.java


  1: /**
  2:    A class of runtime exceptions thrown when an attempt
  3:    is made to find the square root of a negative number.
  4:    @author Frank M. Carrano
  5:    @author Timothy M. Henry
  6:    @version 5.0
  7: */
  8: public class SquareRootException extends RuntimeException
  9: {
 10:    public SquareRootException()
 11:    {
 12:       super("Attempted square root of a negative number.");
 13:    } // end default constructor
 14:  
 15:    public SquareRootException(String message)
 16:    {
 17:       super(message);
 18:    } // end constructor
 19: } // end SquareRootException