小编0xG*_*0xG的帖子

Powershell尝试,捕获:为什么我们需要最后?

这给我带来了一个至高无上的新手问题,但我无法在googleverse的任何地方找到答案.我写了一些相当复杂的脚本,但从未想过这个:

try { raise-errorCode}
catch { do-someThing}
finally {more-code}
Run Code Online (Sandbox Code Playgroud)

与:

try { raise-errorCode}
catch { do-someThing}
more-code
Run Code Online (Sandbox Code Playgroud)

有什么不同?

powershell finally try-catch

0
推荐指数
1
解决办法
267
查看次数

标签 统计

finally ×1

powershell ×1

try-catch ×1