In C#, will the folloing code throw e containing the additional information up the call stack?
...
catch(Exception e)
{
e.Data.Add("Additional information","blah blah");
throw;
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it will. A lot of developers don’t realise that the following code will throw a new exception from that point in the call-stack, not the calls made previously up the stack before the
catch.I learnt this the hard way!