I have multiple functions and i have try, except in each and I would like to show user in alert what the error was (only for selected functions)
except Exception as e:
script.update_record(sc_status = 10)
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
errmsg = [exc_type, fname, exc_tb.tb_lineno,e.__doc__ , e.message]
print "errmsg ", errmsg
print(exc_type, fname, exc_tb.tb_lineno)
print e.__doc__
print e.message
return dict(status = 666, errmsg = errmsg)