Skip to content

Commit 2264a0c

Browse files
committed
feat: removed unneccessary exception in lesson14 homework by Yemi
1 parent be83c8d commit 2264a0c

File tree

1 file changed

+1
-2
lines changed
  • lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce

1 file changed

+1
-2
lines changed

lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/EcommerceSystem.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public void addProduct(String productId, String name) {
1717
products.put(productId, new Product(productId, name));
1818
}
1919

20-
public String placeOrder(String productId, int quantity)
21-
throws ProductNotFoundException, Exception {
20+
public String placeOrder(String productId, int quantity) throws ProductNotFoundException {
2221
Product product = products.get(productId);
2322
if (product == null) {
2423
throw new ProductNotFoundException("Product with ID 1 not found");

0 commit comments

Comments
 (0)