Got more questions? Find advice on: ASP | SQL | Regular Expressions | Windows
in Search
Welcome to XmlAdvice Sign in | Join | Help

Kirk Allen Evans' XML Blog

.NET From a Markup Perspective

VB.NET Propagating Improper SEH

I have done several presentations on SEH, and always get a reaction when I tell them to catch only what they can reasonably handle. At the latest presentation I did on SEH, someone pointed out that VS.NET automatically puts in a "catch e as Exception" clause for VB.NET applications! This should be at the top of the list for things the VS.NET team should remove. Go into a method inside a VB.NET project and type the word “try“, then hit enter.  The following code is generated:

Try

Catch ex As Exception

End Try

 

See Chris Brumme's blog entry on SEH if you don't know why this is A Very Bad Thing.

Sponsor
Published Wednesday, January 28, 2004 7:38 PM by kaevans
Filed under:

Comments

 

kaevans said:

Chris' article describes Exception handling but why exactly is it bad to catch (Exception e) ?
January 30, 2004 1:07 PM
 

kaevans said:

October 25, 2004 7:37 PM
 

TrackBack said:

January 31, 2004 12:03 PM
 

TrackBack said:

February 4, 2004 12:35 AM
 

TrackBack said:

February 4, 2004 6:33 PM
 

TrackBack said:

February 5, 2004 10:21 AM
Anonymous comments are disabled

This Blog

Syndication

News

Looking for a place to talk about XML? Tired of the "main feed police" cracking about your interests in football and politics? Sign up for a free web log on XMLAdvice.com.