Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wrap DownloadFile call in a try-catch (fix #90)
this makes no difference when running Get-LSUpdate in a normal PowerShell session, but some deployment/script-running solutions wrap the entire script in a big try-catch which triggered on any .NET exception from DownloadFile. Try-Catching the DownloadFile call separately and "downgrading" any exceptions to a PowerShell-native error prevents any unintended script terminations in such cases. I still recommend NOT wrapping LSUClient scripts in a global try-catch whenever it is possible to avoid it. also referencing previous issues #35, #36, #37 and #65
- Loading branch information
5c0aab3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PSScriptAnalyzer results as of this commit:
See details