Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint
Drag to reposition
Server Side Programming Questions
Errors like syntax errors occurring at compile time are called errors and those occurring at runtime are called exceptions. Yet python exceptions like NameError, TypeError…have their names ending in Error. Why is it so?
To declare a simple custom exception we can have a script like this But how do I declare a custom exception to override something or to pass extra arguments to the exception?
I have this code that can throw up an error. How do I manually throw or raise an exception in the given code?
The following code throws more than one exceptions How to rewrite it to show exception chaining in python 3.x?
I have the following code that throws an exception as follows showing output as How do I rewrite this code to use the else clause?
I have a try-except block in following code and I just want to continue with the code by ignoring the exception block. The problem is if I leave the ‘except’ block empty or with a #do nothing, it gives an error as follows How do I properly bypass the except block?      
If my code has more than one or multiple exceptions, how to write the try-except block to catch multiple exceptions?
I have the code as follows How do I test if the value of i is a positive integer value and raise an exception if it is not one?
I have a user defined or custom exception as follows How do I raise and implement this CustomException?
I have created an exception class as follows How can I give it a variable when it gets raised and then retrieve that variable when I handle it in the try-except block?
loader
Contribution

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.