nested exception

This commit is contained in:
Mert Gör ☭ 2023-08-16 16:20:39 +03:00
parent d262380b86
commit b18d81d2e2
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,20 @@
def foo():
print('foo begins...')
try:
bar()
except ValueError:
print('yanlış değer')
print('foo ends...')
def bar():
print('bar begins...')
tar()
print('bar ends...')
def tar():
print('tar begins...')
val = int(input('Bir değer giriniz:'))
print('tar ends...')
foo()

View File

@ -0,0 +1,18 @@
def foo():
print('foo begins...')
try:
bar()
except ValueError:
print('yanlış değer')
print('foo ends...')
def bar():
print('bar begins...')
tar()
print('bar ends...')
def tar():
print('tar begins...')
val = int(input('Bir değer giriniz:'))
print('tar ends...')