public void AddNewProduct(Product newProduct) { if (newProduct == null) { throw new Exception("Product details are not there"); } //Check all the business rules of the App.... try { com.AddNewProduct(newProduct.Name, newProduct.Cost, newProduct.CategoryID); } catch (InsertionFailedException ex) { throw ex; } }