/** * MyFirstException.java * * Example of constructing your own Exception type. * This exception is used by "ExceptionThrower". * * @author Brad Rippe (brippe@fullcoll.edu) * @version 1.0 */ public class MyFirstException extends Exception { /** * MyFirstException's default constructor * This constructor sets the message of its base class to: * "MyFirstException: created with the default constructor" */ public MyFirstException() { super("MyFirstException: created with the default constructor"); } /** * MyFirstException's single parameter constructor * This constructor allows the user to set the message of its base class * @param message - the new message */ public MyFirstException(String message) { super(message); } }