
public class MainDriver3 {

	public static void main(String[] args) {
		try {
			doIt(10);
		} catch (ExceptionB exc2) {
	 		System.out.println("ExceptionB happened");
	 		exc2.printStackTrace();
	 	} catch (Exception exc) {
			System.out.println("Exception happened");
		} /* catch (ExceptionC exc1) {
		 	System.out.println("ExceptionC happened");
	 	} */
		
	}
	
	
	public static void doIt(int count) throws Exception {
		System.out.println("in doIt(): " + count);
		
		if (count == 7)
		 	throw new Exception(); 	
		if (count == 8)
		  	throw new ExceptionB();
		 
		
		if (count == 0)
			return;
		else
			doIt(count-1);	
	}
}
