using Microsoft.Office.Server;
try
{
//Code goes here
}
catch (Exception ex)
{
properties.Cancel = true;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
Microsoft.Office.Server.Diagnostics.PortalLog.LogString("Error in cash advacne item added: {0} || Source:{1} || StackTrace:{2}", ex.Message, ex.Source,ex.StackTrace);
});
throw new SPException("Unable to Create request");
}
finally
{
if (web != null)
{
web.AllowUnsafeUpdates = false;
web.Dispose();
}
}
try
{
//Code goes here
}
catch (Exception ex)
{
properties.Cancel = true;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
Microsoft.Office.Server.Diagnostics.PortalLog.LogString("Error in cash advacne item added: {0} || Source:{1} || StackTrace:{2}", ex.Message, ex.Source,ex.StackTrace);
});
throw new SPException("Unable to Create request");
}
finally
{
if (web != null)
{
web.AllowUnsafeUpdates = false;
web.Dispose();
}
}
No comments:
Post a Comment