how can I handle user defined exceptions and after handling them resume the flow of program. here is

Posted by fari on Stack Overflow See other posts from Stack Overflow or by fari
Published on 2010-04-10T03:06:38Z Indexed on 2010/04/10 3:13 UTC
Read the original article Hit count: 376

Filed under:
|
/**
 * An exception thrown when an illegal side pit was
 * specified (i.e. not in the range 1-6) for a move
 */
public class IllegalSidePitNumException extends RuntimeException
{
    /**
     *  Exception constructor.
     *  @param sidePitNum the illegal side pit that was selected.
     */
    public IllegalSidePitNumException(int sidePitNum)
    {
        super("No such side pit number: "+sidePitNum);
    }
}

how do i use this ina program and then resume for there. I do not want the program to end but want to handle the exception and continue.

© Stack Overflow or respective owner

Related posts about java

Related posts about exceptions