Exception Handling : Design Patterns In Python

Channel:
Subscribers:
24,900
Published on ● Video Link: https://www.youtube.com/watch?v=jOxJSA3sxcQ



Duration: 5:49
827 views
8


Documentation : https://sbcode.net/python/abstract_factory/#exception-handling

Your Python code may produce errors. It happens to everybody. It is hard to foresee all possible errors, but you can try to handle them in case anyway.

Use the Try , Except and optional finally keywords to manage error handling.

In the example code, if no chair or table is returned, an Exception error is raised and it includes a text string that can be read and written to the console.

Within your code you can use the raise keyword to trigger Python built in exceptions or even create your own.

(Book)Sometimes you just want to switch off your computer and read from a book. So, all GoF patterns are discussed in my Design Patterns In Python book
https://www.amazon.com/dp/B08XLJ8Z2J : ASIN B08XLJ8Z2J
https://www.amazon.com/dp/B08Z282SBC : ASIN B08Z282SBC

#exceptions
#exceptionHandling
#designPatterns
#pythonDesignPatterns







Tags:
Design Patterns In Python
B08XLJ8Z2J
error handling
pylint
W0703
Exception Handling
B08Z282SBC