Skip to content

Commit e22ce0f

Browse files
author
AmiyahJo
committed
fix: lesson14.java inlude string for placing an order and error messages
1 parent dea4134 commit e22ce0f

File tree

1 file changed

+3
-3
lines changed
  • lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14

1 file changed

+3
-3
lines changed

lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/Lesson14.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ public class Lesson14 {
55
public static void main(String[] args) {
66
// System.out.println("Hello World");
77
try {
8-
ecommerceSystem.placeOrder("1", 1);
8+
String orderId = ecommerceSystem.placeOrder("1", 1);
99
} catch (ProductNotFoundException e) {
10-
System.out.println("Product not found.");
10+
System.out.println("Product with ID " + orderId + " not found.");
1111
} catch (OrderNotFoundException e){
12-
System.out.println("Order not found.");
12+
System.out.println("Order with ID " + orderId + " not found.");
1313
}
1414
}
1515
}

0 commit comments

Comments
 (0)