异常处理

class SimpleException extends Exception { }

class RecommendExc extends RuntimeException {
    //recommended constructors
    public RecommendExc () { }
    public RecommendExc(String message) { 
        super(message);
    } 

    //... any other members
}

try {
    throw new SimpleException();
catch (SimpleException e) {
    System.out.println("caught " + e);
}

throw new RecommendExc("exeption"); //<-Error