摘要: 之前大多情况了下直接打印: print(f"Caught an exception: {e}") try: # 尝试执行的代码块 risky_operation() except SomeSpecificException as e: # 处理特定异常 print(f"Caught an excep 阅读全文
posted @ 2024-07-24 09:35 lshan 阅读(31) 评论(0) 推荐(0) 编辑