//2.7 public void addToShoppingBasket(int product, int amount, int session) { if (product < 0) { throw new Domain.ILLArgumentException("invalid product id"); } if (session < 0) { throw new ILLArgumentException("error - bad session"); } db.addToShoppingBasket(product, amount, session); }
public void addToShoppingBasket(int product, int amount, Session session) { if (product < 0) { throw new ArgumentException("invalid product id"); } if (session == null) { throw new NullReferenceException("error - bad session"); } db.addToShoppingBasket(product, amount, session); }