i am trying to handle exception and save that exception in database
Function1()
{
try
{
for(int i=0;i<dt.rows.count;i++)
{
Function2();
}
}
catch(exception ex)
{
saveInDB(ex.message.tostring(),id);
}
}
Function2()
{
try
{
function3()
}
catch(exception ex)
{
throw ex;
}
}
Function3()
{
try
{
function4()
}
catch(exception ex)
{
throw ex;
}
}
Function4()
{
try
{
code;
}
catch(exception ex)
{
throw ex;
}
}
suppose i got a exception in method4 then it will throw it to function3->Function2->function1 and then function1 will write exception in database.
but after writing exception in DB i want to continue for loop.
so how should i do?