#21 - Exception Handling in Python

Veröffentlicht am: 01 Dezember 2020
auf dem Kanal: Tech Vitals
254
6

Learn about Exception Handling in Python. Exception is an error that occurs while executing a code. When there is an error or bug in our code, Python will display an error message which is only understood by programmers. The clients or non-technical persons cannot understand the error message and they will have no idea what's wrong with the code. Python Exception Handling lets the programmers to handle such exceptions efficiently and provide the error message that can be easily understood by the clients or other non-technical persons.
For all the code that can raise an exception, we place them inside try block. We define the except block for the possible errors in the try block. If the code in try block has an error, python will execute the except block. We can define multiple except block of same try block so that we can handle each exceptions separately.
We can define finally block if we want to run some code even if the code has some errors or exception. We can also define else block which will only run if there is no error or exception in the code.
We can also define our own custom exception and raise the exception if certain condition is true.

Facebook:   / techvitals  


Auf dieser Seite können Sie das Online-Video #21 - Exception Handling in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Tech Vitals 01 Dezember 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 254 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!