Exception Handling Tips in Python ⚠ Write Better Python Code Part 7
About
No channel description available.
Latest Posts
Video Description
💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. This video covers exception handling in Python and it gives you a few more advanced tips of how to handle exceptions in production environments, including using different exceptions at each level of your application, using a context manager to automatically clean up resources such as an open database connection, and using decorators to have an easy mechanism for retrying operations if an exception occurs, or automatically logging exceptions to a file. GitHub repository: https://github.com/arjancodes/betterpython. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 1:43 Example explanation 4:29 Running the example 5:59 Exception types and handling exceptions on different levels 12:43 Adding a context manager 16:12 Retry decorator 17:46 Automatic logging of exceptions 18:37 Disadvantages of handling errors by exceptions 19:47 Alternative ways of handling errors 21:20 Outro #arjancodes #softwaredesign #exceptionhandling
Build Your Own Drone Kit
AI-recommended products based on this video

N2 Pro 8K USB 4 Mini PC Ryzen 7 6800H, 32GB DDR5 RAM 512GB NVMe SSD Gaming Mini PC, Quad Display, Wi-Fi 6E, USB 3.2, BT 5.2

VENOEN Firewall Mini PC Firewall Appliance 2.5gbe, 8GB RAM 128GB SSD Fanless Mini PC Firewall Hardware, 4 LAN Mini PC Fanless Firewall Celeron J4125, AES-NI, HD, USB 3.0, SIM Slot, RTC

Aswewamt 4 Pcs Mini Backpack Cosmetic Bag Keychain PU Leather Lipstick Holder Cute Case Coin Purse Wallet Card Holder Data Cable Organizer Zipper Pouch Portable Travel Storage Bag for Women, Multicolor

BOSGAME Mini PC P2 Pro, Intel i9-12900H (14C/20T,up to 5GHz) 32GB DDR5 RAM 1TB PCIe Gen 4 NVMe SSD Mini PC, 1x Thunderbolt 4 Port, 2X 2.5G LAN Ports,4K Triple Display, WiFi 6E, Bluetooth 5.2

Cordless Car Handheld Vacuum: Car Vacuum Cleaner with 16000Pa Ultra-Strong Suction, Brushless Motor & HEPA Filter - Lightweight Design for Drivers and Office Workers - Ashen

Compressed Air Duster-380000RPM Super Power Electric Air Duster, Rechargeable Brushless Motor Durable Blower for Fast Charging, Adjustable Mini Blower for House,Outdoors,Car

Long Range Super Endurance Foldable Drone with Camera for Beginners–36+ min Flight Time, WiFi FPV Quadcopter with 2K HD Camera, Brushless Motor, Auto Hover, Follow Me (2 Batteries)

NAFYRE N11 PRO GPS Drone with Camera for Adults 4K UHD, 90 Min Long Flight Time, Long Control Range, Auto Return, Follow Me, Brushless Motor, 5G FPV RC Quadcopter for Beginners

Long Range Super Endurance Foldable Drone with Camera for Beginners–36+ min Flight Time, WiFi FPV Quadcopter with 2K HD Camera, Brushless Motor, Auto Hover, Follow Me (2 Batteries)

Super Enduring Brushless Motor Drone with Camera for Beginners, CHUBORY A68 WiFi FPV Quadcopter with 2K HD Camera, Auto Hover, 3D Flips, Headless Mode, Trajectory Flight

NAFYRE N11 PRO GPS Drone with Camera for Adults 4K UHD, 90 Min Long Flight Time, Long Control Range, Auto Return, Follow Me, Brushless Motor, 5G FPV RC Quadcopter for Beginners

FERIETELF Drone with Camera - T26 RC Drones for Adults with 1080P HD Live Video, FPV Drone with 24mins Flight/Altitude Hold/Headless Mode/Gravity Sensor for Kids Beginners

【DDR3 RAM】 GIGASTONE 16GB Kit (2x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 UDIMM 240 Pin Unbuffered Non ECC High Performance PC Desktop Memory Upgrade

【DDR3 RAM】 GIGASTONE 32GB Kit (4x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 UDIMM 240 Pin Unbuffered Non ECC High Performance PC Desktop Memory Upgrade

【DDR3 RAM Laptop Only】 GIGASTONE 16GB Kit (2x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 SODIMM 204 Pin Unbuffered Non ECC High Performance Notebook Memory Upgrade




















