Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Try Catch success

$
0
0

We always have people posting failures and questions so why not the occasional win. I’ve struggled with using Try Catch effectively until today when it all finally clicked. Up until now I’d wrote complex (or just confusing) If Elseif statements but using Try Catch is so much cleaner. Not sure why it never clicked but I think it was lack of understanding of the $Error variable and using .GetType().Fullname. Now that I can get the type of error it makes it so much easier.

Anyway, I love his subreddit and continue to learn a lot from all of you!

submitted by /u/lordv0ldemort
[link] [comments]

The post Try Catch success appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles