🔥 Welcome to my blog! Latest updates available now. Visit daily! 🔥 🔥 Click Here for Latest Updates – Visit My Blog 🔥
🔥 Latest Updates 📊 GP Grade Finder 📢 Government Services Info 🆕 New Schemes Updates

Default Exception Handling in Python



👉Every exception in Python is an object. 

👉For every exception type, the 

     corresponding classes are available.

👉Whenever an exception occurs, PVM will create the corresponding exception object and will check for handling code. 

👉If handling code is not available, then the Python interpreter terminates the program abnormally and prints corresponding exception information to the console.

👉The rest of the program won’t be executed.

Ex:Python1.py

1) print("Hello")

2) print(10/0)

3) print("Hi")

Output:


D:\Python3>py Python1.py

Hello

Traceback (most recent call last):

  File "test.py", line 2, in <module>

    print(10/0)

ZeroDivisionError: division by zero

No comments:

Post a Comment

Thank you Very Much.For Given Comment

à°†ంà°§్à°°à°ª్à°°à°¦ేà°¶్‌à°²ో సదరం సర్à°Ÿిà°«ిà°•ేà°Ÿ్ à°•ోà°¸ం à°Žà°¦ుà°°ుà°šూà°¸్à°¤ుà°¨్à°¨ à°¦ిà°µ్à°¯ాంà°—ులకు à°¸్à°²ాà°Ÿ్ à°¬ుà°•ింà°—్ à°…à°ª్‌à°¡ేà°Ÿ్.

à°‡ంతకుà°®ుంà°¦ు వరకు SADAREM Slot Booking à°ª్à°°à°•్à°°ిà°¯ à°¸్వర్à°£ à°—్à°°ాà°®ం à°¸్వర్à°£ à°µాà°°్à°¡ు à°¦్à°µాà°°ా à°®ాà°¤్à°°à°®ే à°…ంà°¦ుà°¬ాà°Ÿుà°²ో à°‰ంà°¡ేà°¦ి. à°ª్à°°à°¸్à°¤ుà°¤ం à°ª్రజలకు మరింà°¤ à°¸ౌà°•à°°్యవం...