I know what you are tyring to say.. I just commented for the above post as they simply catching and throwing it again with out doing any work..
M
mohan5k
@mohan5k
Posts
-
Catch an Exception... then throw it? -
Catch an Exception... then throw it?HI, I do not really understant why we have to catch the exception and throw it. I mean if a (first)function/sub is caling another (Second)function/sub if any exception is coming in sencond function why we have to catch it and throw it. It will automatically throw the exception right?
function1()
{
try
{
calling function2()
}
catch(exception e)
{
//I handled the exception thrown from the functions/subs called
}}
function2()
{
//if any error/exception comes here .net handler automatically throws it to the calling function/sub where it was handled.
}modified on Monday, November 29, 2010 7:18 AM