Implication of (not) rethrowing exception after logging
Posted
by dotnetdev
on Stack Overflow
See other posts from Stack Overflow
or by dotnetdev
Published on 2010-03-22T10:03:34Z
Indexed on
2010/03/22
10:11 UTC
Read the original article
Hit count: 196
exception-handling
Hi,
In a team environment, if I handle an exception (like so):
protected void Page_Load(object sender, EventArgs e)
{
this.exTest();
}
public void exTest()
{
try
{
throw new Exception("sjsj");
}
catch (Exception ex)
{
string s = ex.Message;
throw;
}
}
What is the implication of not rethrowing the exception (throw)? Even without the keyword the custom error settings in web.config are used (redirection to specified page).
Thanks
© Stack Overflow or respective owner