Exception Handling Basics(caublestoneink.com)
submitted by jcauble(150) 2 years, 9 months ago
The basics of exception handling and getting good stack traces.
2 comments |category: C# |Views: 467 Tweet
tags: C# another
Add a live kick counter to your blog >>
You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:
Simply copy and paste this HTML into your blog post.
posted by leedumond(2139) 2 years, 9 months ago 0
Sorry, but this is about the worse example of exception handling I have ever read. For an article called "Exception Handling Basics", it makes some HUGE and very "basic" errors. First, the examples throw ArgumentNullException from methods that HAVE NO ARGUMENTS. This makes absolutely NO sense. This is pretty much "Basic" Exception Handling 101. Second, there are catch(Exception) and empty catch blocks all over the place. You should never, EVER catch System.Exception. Another very "basic" no-no. Sure, it does demonstrate what happens when you reset the call stack, which you shouldn't do. Unfortunately, the examples are so "basically" flawed it makes my teeth hurt.
Reply
posted by samdnp(975) 2 years, 9 months ago 0
I agree that the article has some problems. A good place to learn about exception handling is in the BCL itself. You can see how that uses the ArgumentNullException, etc.
All tags Your tags
Suggest a new category
dpeterson(1831)
pwhe23(1134)
rcash(540)
vijayst(504)
bsenoff(360)
bnaya(312)
winphonegeek(260)
Matt_TCF(253)
isenthil(250)
Noldorin(235)