Re: try/catch block design. Two approaches, which one's best?!
- From: "Marc Gravell" <marc.gravell@xxxxxxxxx>
- Date: Fri, 16 Jun 2006 15:38:07 +0100
Not quite there...
It is about preserving the *original* stack trace, versus seeing a stack
trace that only goes as far as your handler;
Imagine the exception is thrown 27 levels down, and you catch it at the 15th
level; if you "throw", then the stack-trace still shows the route to the
original 27th level method - which allows you to inspect an exception,
decide its none of your business, and throw it as though you didn't look. If
you "throw ex" (even with the original ex), then it now only shows the route
to the 15th level.
Marc
.
- References:
- try/catch block design. Two approaches, which one's best?!
- From: Mr Flibble
- Re: try/catch block design. Two approaches, which one's best?!
- From: Frans Bouma [C# MVP]
- Re: try/catch block design. Two approaches, which one's best?!
- From: Kevin Spencer
- Re: try/catch block design. Two approaches, which one's best?!
- From: Mr Flibble
- try/catch block design. Two approaches, which one's best?!
- Prev by Date: Re: Add line numbers to richtextbox
- Next by Date: Re: How to format tooltip text?
- Previous by thread: Re: try/catch block design. Two approaches, which one's best?!
- Next by thread: Re: try/catch block design. Two approaches, which one's best?!
- Index(es):
Relevant Pages
|