Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Handling errors

$
0
0

$? is *really* a poor way to do error handling. You should instead use -ErrorAction and a Try/Catch block. Within the Catch block, you can check $_ or $error[0] to see the error that happened.


Viewing all articles
Browse latest Browse all 13067

Latest Images

Trending Articles



Latest Images