Skip to content

Conversation

@A1-4U2T1NN
Copy link
Contributor

No description provided.

A1-4U2T1NN and others added 30 commits September 26, 2024 09:53
A1-4U2T1NN and others added 4 commits October 28, 2024 08:49
…ductNotFoundException; added new ProductNotFoundException for placeOrder if product is null; added new OrderNotFoundException for checkOrderStatus if order is null or cancled;
orders.put(orderId, new Order(orderId, product, quantity));
// Asks if product is null and to throw the exception message 'Product with ID {orderId} not
// found' if it is.
if (product == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd to put it here since an empty product would probably lead the Order constructor to blow up. Check your inputs before you do any work in the function.

@A1-4U2T1NN A1-4U2T1NN deleted the lesson_14 branch November 25, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants