For example in this code, I want my script behavior this way.
when run to b=a[2], or any line will raise an exception, and no matter what is the exception. I want the script stop, and raise a customized red error message like: 'LOL!!!'
How to implement that?
try:
a = [1,2]
b = a[2]
except:
raise something