
try: xxxxxx except Exception as e: # print(e) print(type(e)) # output:<class 'MySQLdb.ProgrammingError'> print(e.__class__.__name__) # output:ProgrammingError 请问在这种情景下,如何能获得'MySQLdb.ProgrammingError'完整的字符串?
1 Vegetable 2023 年 10 月 31 日 f"{e.__class__.__module__}.{e.__class__.__name__}" |