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() ")
我知道这听起来简单,但是我需要弄清楚如何显示实际例外。