// Exception 만들기
public class CartBean implements SessionBean {
public void removeBook(String title) throws BookException {
boolean result = contents.removeElement(title);
if (result==false) {
throw new BookException(title+" not id cart");
}
System.out.println("removeBook");
}
}
public class BookException extends Exception {
public BookException() {}
public BookException(String msg) {
super(msg);
}
}