加上抛出异常
try: # some code that might raise an exception except Exception as e: # handle the exception by printing the error message print("An error occurred:", e) # raise the same exception to the caller raise e
原文地址: https://www.cveoy.top/t/topic/fFcA 著作权归作者所有。请勿转载和采集!