aaing Exaplens
The aise statenent
lhe aase st adenent
an exception Manaally
o
Syndax aaise exeption name Cc optional cnquned
Eangle: da dide Ca,)
laise Zy6Dinsion Ex Cannotdbide by Zoua
Aotusun a/b
b not Zeuo, the lunction osuns
a/b'
he astot Atdansent
Hut an expressjon in the praqram Code the
tesding Comes false then he excaption
Surdax:
aAsod expreson L,dotqumerds
del dride a,b):
OsSesd b! 0
> b i s Zaoit stons ttha proqram and
Acises an seh onEoo uthtthe mos Saqe
Canot divide by Zoxo
he proqam Cotinues to te
hext i
Each and evtsuy exception has to be handled by
Hhe Programmes a avoid the groqram ronm cHaushug
51This is done by usutting add:ti onal code in
Proq9a, to qie rop messoga ct instrutons
to Onencouden
ehLountoas extaption, This
Prolus. is Knousnas excaptron handlis
2Need e Exeelicn Hancla
tandlig
Exuplion handlin i, bain scd no only in
ptthon programmig Tavabut Raby most pracrang
Reuky d.
anguazs. ke ct,
Yython Categosuis exupBioa deslint ypes
o thad Apeuie extabli ons an be cuaoted
each
Exephion handlays sepor de the mai eookon
oqan om the esoue Aeldion and
code
eamrd bdatode' whe
1lhe Aegmnend thee any
bida ona Block
case the ex eption
The Cada to be'executed iinsideanotlen
s plaed hlock
has ocu90iaid
These dalekon'ad Sapothing the
blatenenda forofect
exceptionoo hot tha Mai
The Conpilon o inloprate keeps te
hockhas accLood
position wheeheocc
exact
Excaplion handliaan be done o both
sen- dlalined and bulln expetions.
souLsS eHandi Exaphion
An eut encaunteud
in a melthed
foauts extalian caizt
lEtaphion
Kurime Systm deamches
fo rcaplion handle
found 1
no found.
Executes the tode 1SeancAese melod}n all
otfoud
Lroqramt n a
an eoeH
an
On cojccd callbd the excapon objet,This object
Contasis inlotaon abad the cos Jake ihtpe
proqtann lohese
tle name_and positi on in, the
has ocuLsud
The ohied unhrne
s hauded ouen to the approprnale
that t Can ind an co de
Sustemo
to han dl ts eotalas'exapbon.
prous totho gustime System
handig OVe
Cun extaptjon.
Qalledhauuisg
he udime bystem Seasches the erdie yoa rasg
L a bo ck a Coda, Called tae exepthon
hot Can handla the ased epeed excaphon t
doust Atarcheu the muthod uhicht eFes
has andttu eupton has len aud s7 not
then yiom thieh etis
t Aeanches the method AIOm
Method Loas Calld. hi ianchi cal
Adu continues ll he Iupion handl d
Qutouut Jknouon Call &lach
Jhis
whn Auutabu handluu and un tlu ealslatk
untune systann es not aite to qund an appropriatus
mathas in the a
extupon after seavcling allthe
Atack, then th prcqramxttion slopt