K
Kevin Jackson
In the following code snippet, will the finally block be executed when the
throw is executed in the catch block???? I'm assuming it will.
catch (Exception e)
{
// if (ContextUtil.IsInTransaction)ContextUtil.SetAbort();
ReportError objError = new ReportError();
objError.PersistError(e,null,"DBWrite:executeStoredProcedureReturnXML","Conn
ectionString = " + m_sqlConnectionString + " : blnClearFlag=" + blnClearFlag
+ " : Stored Proc Name=" + storedProcedureName + " : Element Name=" +
elementName);
throw;
}
finally
{
cnConnection.Close();
cnConnection.Dispose();
blnClearFlag = true;
}
throw is executed in the catch block???? I'm assuming it will.
catch (Exception e)
{
// if (ContextUtil.IsInTransaction)ContextUtil.SetAbort();
ReportError objError = new ReportError();
objError.PersistError(e,null,"DBWrite:executeStoredProcedureReturnXML","Conn
ectionString = " + m_sqlConnectionString + " : blnClearFlag=" + blnClearFlag
+ " : Stored Proc Name=" + storedProcedureName + " : Element Name=" +
elementName);
throw;
}
finally
{
cnConnection.Close();
cnConnection.Dispose();
blnClearFlag = true;
}