Source of IntException.java


  1: //IntException.java
  2: 
  3: public class IntException
  4:     extends Exception
  5: {
  6:     private int intMessage;
  7: 
  8:     public IntException()
  9:     {
 10:         super("IntException thrown!");
 11:     }
 12: 
 13:     public IntException
 14:     (
 15:         String message
 16:     )
 17:     {
 18:         super(message + " " + message);
 19:     }
 20: 
 21:     public IntException
 22:     (
 23:         int number
 24:     )
 25:     {
 26:         super("IntException thrown!");
 27:         intMessage = number;
 28:     }
 29: 
 30:     public int getNumber()
 31:     {
 32:         return intMessage;
 33:     }
 34: }