Skip to content

Commit e50e851

Browse files
committed
Feat: syntax fix
1 parent 891b4e4 commit e50e851

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public void addProduct(String productId, String name) {
2020
public String placeOrder(String productId, int quantity) throws ProductNotFoundException {
2121
Product product = products.get(productId);
2222
if (product == null) {
23-
throw new ProductNotFoundException("Product with"+ productId +"not found");
23+
throw new ProductNotFoundException("Product with ID " + productId + " not found");
2424
}
2525
String orderId = UUID.randomUUID().toString();
2626
orders.put(orderId, new Order(orderId, product, quantity));
@@ -33,7 +33,7 @@ public void cancelOrder(String orderId) {
3333

3434
public String checkOrderStatus(String orderId) throws OrderNotFoundException {
3535
Order order = orders.get(orderId);
36-
if (order == null) throw new OrderNotFoundException("Order with"+ orderId +"not found");
36+
if (order == null) throw new OrderNotFoundException("Order with ID " + orderId + " not found");
3737
return "Order ID: "
3838
+ orderId
3939
+ ", Product: "

0 commit comments

Comments
 (0)