File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14 Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 11package com .codedifferently .lesson14 ;
22
3- // import com.codedifferently.lesson14.ecommerce.EcommerceSystem;
4- // import com.codedifferently.lesson14.ecommerce.OrderNotFoundException;
5- // import com.codedifferently.lesson14.ecommerce.ProductNotFoundException;
6-
73public class Lesson14 {
84
95 public static void main (String [] args ) {
106 System .out .println ("Hello world" );
11- // String orderId = null;
12- // try {
13- // orderId = ecommerceSystem.placeOrder("1", 1);
14- // } catch (ProductNotFoundException e) {
15- // System.out.println("Product with ID " + "1" + " not found.");
16- // } catch (OrderNotFoundException e){
17- // System.out.println("Order with ID " + orderId + " not found.");
18- // }
197 }
20- }
21-
22- // ProductNotFoundException <- for product does not exist
23- // OrderNotFoundException <- for both order does not exist and order cancelled
8+ }
You can’t perform that action at this time.
0 commit comments