-
Notifications
You must be signed in to change notification settings - Fork 25
Feat: Adds-Changes to Lesson14 .Java files for Nile Jackson #457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Product product = products.get(productId); | ||
if (product == null) { | ||
throw new ProductNotFoundException("Product with ID 1 not found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the productId
isn't 1? The message should change.
Order order = orders.get(orderId); | ||
if (order == null) throw new OrderNotFoundException("Order with ID 1 not found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same message as above but for orderId
public void cancelOrder(String orderId) throws OrderNotFoundException { | ||
Order order = orders.get(orderId); | ||
try { | ||
if (order == null) throw new OrderNotFoundException("No Such order exists"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not in the requirements for this assignment.
All requested changes have been corrected @anthonydmays , thank you |
This is my e-commerce exception handling assignment for Lesson14.