Python Tutorial - 20. Raise Exception And Finally

preview_player
Показать описание

In today’s python session we will talk about raise exception and finally. We will talk about how to raise “standard exceptions”, how to raise “user define exception”, how to use “finally statement” in exception, how to create a class for exception, how to derive a class from another class, what is exception and how to declare finally statement and use it.

Topics that are covered in this Python Video:
0:00 Introduction
0:26 how to Raise standard Exception
2:03 Raise user define Exception
2:33 Create a class for exception
2:45 Derived class from another class
6:22 How to declare finally statement and use it

Next Video:

Рекомендации по теме
Комментарии
Автор

Seen many of your videos, your class is just next level and I can figure out your hard work for these simple explanation, thanks a lot.

catchamithere
Автор

Regardless of an exception or no exception, finally always run.

rthu
Автор

in your console log there is no output for the print statement in the Finally block. ... it didn't print "cleaning up file"

balakrishna
Автор

@codebasics I cant understand one thing.When you write
try:
. raise Accident('crash between two cars')
except Accident as e :
. e.print_exception()

e is now an instance of class named Accident.But how is this possible?? you did not do e=Accident('crash between two cars")

kostasnikoloutsos
Автор

BG Music is disturbing and is covering up your voice.
Other than that your video is good.

xcelautovik
Автор

You can just use except: to cover everything in the try:

rthu
Автор

Why are using self.msg=msg @from beginner

kishorekumar
Автор

please that bgm may be peaceful for others ...but for some others like me it feels like distracting and unable to concentrate on code.
so, pls dont include bgm in videos if possible...it's annoying while listening.

santhoshr
Автор

Please dont use BG music for tutorials.

makesh