import traceback import re import sys try: pass # ããã«ä½ãå¦çãæ¸ã except Exception as e: error_class = type(e) error_description = str(e) err_msg = '%s: %s' % (error_class, error_description) print(err_msg) tb = traceback.extract_tb(sys.exc_info()[2]) trace = traceback.format_list(tb) print('---- traceback ----') for line in trace: if '~^~' in line: print(line.rstrip()) else: text = re.sub(r'\n\s*', '

{{#tags}}- {{label}}
{{/tags}}