Grokking Java Interview Questions
Vote

0% completed

​

Designing Custom Exceptions

The checkout of an order can fail in several ways, and each one needs a different reaction:

  • The store has only 20 mangoes and the order asks for 25. The customer should see the available quantity.
  • The bank cannot be reached. The payment should be repeated later.
  • The card is refused. The customer should choose another card.
  • The code contains a bug. The customer should see a general error, and the developers need a log entry.

The code that reacts must be able to tell these failures apart

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content