Through this video we dive into the world of error management. Learn the ins and outs of handling exceptions using the indispensable try-except blocks. Discover the nuances of when to deploy the else and finally keywords, adding finesse to your error-handling toolkit.
But that's not all! Elevate your coding prowess as we unveil the secrets of crafting custom exceptions. Explore how to tailor-make exceptions to suit your project's needs, with insights on leveraging raise to elevate your code to new heights.
00:00 - Introduction
02:16 - Try Except blocks
06:56 - Multiple except blocks to handle specific errors
10:42 - Else and Finally keyword
14:44 - Example 1 - Using try except blocks when reading and writing a file
17:35 - Raising and error using raise
20:07 - Example 2 - Identifying the correct string
22:21 - Custom Exceptions
25:09 - Modifying Custom exceptions
28:11 - Modifying custom exceptions using _str_
The summary of this video is available as a youtube short.
• Tips and Tricks: Exception Handling Under ...