Exception Handling Tips in Python β Write Better Python Code Part 7
π‘ 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 mor...

ArjanCodes
142.6K views β’ Mar 26, 2021

About this video
π‘ 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
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
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
142.6K
Likes
4.7K
Duration
21:46
Published
Mar 26, 2021
User Reviews
4.7
(28) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends