1
我試圖找出如何得到的異常,顯示此功能追趕在clone_saved_path)異常(
clone_saved_path():
def clone_saved_path():
except OSError as e:
# If the error was caused because the source wasn't a directory
print('Directory not copied. Error: %s' % e)
print("got here. [4]")
except:
print("Another error occurred in clone_saved_path() ")
print("got here. [5]")
當我運行我的代碼,它擊中最後except
塊並且輸出:
print("Another error occurred in clone_saved_path() ")
我知道這聽起來簡單,但是我需要弄清楚如何顯示實際例外。