The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Throw vs Throw ex

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Max Zone

Posts: 9170
Nickname: dzone
Registered: Jun, 2006

dzone.com is a link-sharing community where member participation determines what gets published
Throw vs Throw ex Posted: Dec 28, 2006 12:35 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Max Zone.
Original Post: Throw vs Throw ex
Feed Title: dzone.com: .net
Feed URL: http://www.dzone.com/feed/frontpage/.net/rss.xml
Feed Description: dzone.com: fresh .net links for developers
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Max Zone
Latest Posts From dzone.com: .net

Advertisement
A common mistake a lot of new .Net developers do is using Throw ex instead of just Throw. The difference between Throw ex and Throw is very simple but can cause major headaches when it comes to maintenance. If you use Throw ex it overwrites the stack trace this makes it very hard to find the original line of the thrown exception as you can see in the example I have provided.

Read: Throw vs Throw ex

Topic: Data Points: Column Expressions, DataRelations, and Computations Previous Topic   Next Topic Topic: DasBackup: Produktupdate

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use