previous |
start |
next
Designing Your Own Exception Types
- if (amount > balance)
throw new InsufficientFundsException(. .
.);
- Make it an unchecked exception--programmer could have avoided
it by calling getBalance first
- Extend RuntimeException
- Supply two constructors
previous |
start |
next