4 ms·
There is a try/catch/finally mechanism in powershell: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_try_catch_finally
by little_panda 6y ago
There is a try/catch/finally mechanism in powershell: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_try_catch_finally?view=powershell-7.1 https://docs.microsoft.com/en-us/powershell/module/microsoft...
However, it is quirky to set up and I don't remember the details now, it doesn't handle the errors out of the box for sure.
I would still prefer powershell over bash (or god forbid, cmd) any day.