see
http://www.aspnetresources.com/blog/...ion_class.aspx
What I do is this.. which isn't what you want.
try
{
// web page stuff
}
catch(Exception ex)
{
Response.Write (ex.Message);
// or this
/*
if(null!=ex.InnerExeption)
{
Response.Write(ex.InnerException.Message);
}
*/
}
Ok.. having said that.. then yeah. do this.
try
{
//web stuff
}
catch(MyNamespace.MyException mex)
{
throw new SuperFriendlyException("MyException was thrown, but I don't
want to show you its info");
}
catch(Exception ex)
{
throw new SuperFriendlyException("ex was thrown, but I don't want to
show you its info");
}
Something like that.
Note, MyException is not the same object as SuperFriendlyException
<bd*****@pacbell.netwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Hi,
I made a custom exception, derived from ApplicationException. If the
exception is thrown, the erroring web page shows the line of code where
I throw exception, and doesn't display the exception message. Do I
need to catch my custom exception, and rethrow it as another type of
exception to make the message display?
I still want to page to error out, I don't want to catch it and return
a user-friendly message or anything. The page needs to error so that
operations will know errors are being thrown.
Thanks