G
GoogleNewsReaderMan
I want to "rethrow" an exception so as not to lose the original stack
trace information. I understood that I could use throw, like:
try {
DoIt();
}
catch (Exception ex) {
DoSomeExceptionStuff(ex);
throw;
}
However, this apparently does NOT preserve the stack trace--it loses it
just like using throw ex; does! I am currently using .NET 1.1 SP1. Is
this a known bug? Why do so many people report that it works for them?
Have they actually tried it?
Why would a bug like this exist in v. 1.1 SP1?
Can anyone help shed some light on this?
Thanks in advance.
trace information. I understood that I could use throw, like:
try {
DoIt();
}
catch (Exception ex) {
DoSomeExceptionStuff(ex);
throw;
}
However, this apparently does NOT preserve the stack trace--it loses it
just like using throw ex; does! I am currently using .NET 1.1 SP1. Is
this a known bug? Why do so many people report that it works for them?
Have they actually tried it?
Why would a bug like this exist in v. 1.1 SP1?
Can anyone help shed some light on this?
Thanks in advance.