Programming & AI Tips 💡
45.9K subscribers
67 photos
11 videos
30 files
388 links
Programming & AI:
Tips 💡
Articles 📕
AI & LLMs 👾
Design, Architecture, Principles ✅

🇳🇱 Contact: @MoienTajik
Download Telegram
Try Catch Finally 🔄

Try blocks are like transactions.

Your catch has to leave your program in a consistent state, no matter what happens in the try.

For this reason it is good practice to start with a try-catch-finally statement when you are writing code that could throw exceptions.

This helps you define what the user of that code should expect, no matter what goes wrong with the code that is executed in the try .

#CleanCode #Exceptions