String-Based Exceptions : Error Exception : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » Error Exception »

 

String-Based Exceptions


myexc = "My exception string"
try:
    raise myexc
except myexc:
    print 'caught'



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Statement
» Error Exception