Skip to content

Chigazo Lesson 14 Ecommerce System #475

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

Closed
wants to merge 34 commits into from

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;
Product product = products.get(productId);
String orderId = UUID.randomUUID().toString();
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