Raising Exceptions : Exception Raise : Exception PYTHON examples


PYTHON examples » Exception » Exception Raise »

 

Raising Exceptions


Raising Exceptions



# The raise statement: force a specified exception to occur.

raise NameError, 'HiThere'

# The above could be written as 

raise NameError('HiThere') 


           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Exception
» Exception Raise