Raising Exceptions : Exception Raise « Exception « Python
- Python
- Exception
- Exception Raise
Raising Exceptions

# The raise statement: force a specified exception to occur.
raise NameError, 'HiThere'
# The above could be written as
raise NameError('HiThere')
Related examples in the same category