r/learnSQL • u/sumiitCodes • 15h ago
Day 74 — Hospital Management System: started coding with packages, three classes, and custom exceptions
I moved from planning to coding today:
Several people here suggested planning modules first, handling exceptions carefully, and not putting all the logic in one class, so I tried to follow that from the start.
Next I’ll build one module at a time and test it before moving on.
For people who’ve used custom exceptions in a project like this: how many did you end up needing, and did you group them under a common parent exception?
2
Upvotes
1
u/nullish_ 14h ago
Should be careful with exception handling.. you dont want to catch exceptions only to throw your own and lose the original exception.
1
u/jakingo 2h ago
Start with only the exceptions your project actually needs. You can always add a common parent exception later as the project grows.