

You can raise exceptions using theraise statement. You also have to specify the name of the error/ exception and the exception object that is to be thrown along with the exception. The error or exception that you can arise should be class which directly or indirectly is a derived class of theError orException class respectively.