Skip to content

Instantly share code, notes, and snippets.

@AvgustPol
Created November 3, 2020 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AvgustPol/294a11703860c08ab2c5fdcb5d8718b0 to your computer and use it in GitHub Desktop.
Save AvgustPol/294a11703860c08ab2c5fdcb5d8718b0 to your computer and use it in GitHub Desktop.
the best way to deal with try-catch I`ve found so far
try { ... }
catch {
Write-Host "An error occurred:"
Write-Host $_
}