Powershell Best Practice #10: Avoid empty Catch block

By | June 7, 2015

Best Practice: It is recommended to avoid empty empty Catch block in a try-catch-(finally) statement.

Explanation: Leaving an empty catch block is not considered a good practice because when an error occcurs in the try block, no action is performed on the error.


previous-buttonnext-button

One thought on “Powershell Best Practice #10: Avoid empty Catch block

  1. Pingback: Powershell Best Practice #11: Use Set-StrictMode | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *