NotSupportedException

I had written some code that implemented a particular interface where I only wanted to support a small set of the functions. So when I used Visual Studio’s snippet I left the throw new Exception("Not yet implemented") alone. My ever knowing colleague explained to me that this was a known problem with the snippet and it should really use…
throw new NotSupportedException

I thought this was a great find since I hated raising such a woolly exception.

Advertisements
This entry was posted in cSharp. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s