Hi want to get detailed exception report on any exception I got and send email.
I have done everything Except I want Method name in which exception occurred, class name , file path, event name
using below code to generate exception (allowunsafeupdate false)
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPPermissionInfo info = oWeb.GetUserEffectivePermissionInfo(oWeb.CurrentUser.Name);
SPPrincipal userGroup = oWeb.CurrentUser;
SPRoleAssignment roleAssignment = new SPRoleAssignment(userGroup);
SPRoleDefinition roleDefination = oWeb.RoleDefinitions["Contribute"];
roleAssignment.RoleDefinitionBindings.Add(roleDefination);
l.RoleAssignments.Add(roleAssignment);
l.Update();
});
}
catch (SPException ex)
{
CustomError(ex, oWeb.CurrentUser.Name, "one@two.com");
}
I am getting below outputbut I wants Method name, class name, event name, file path details anyhow using C#.
in stack track I am able to see details but I want in separate column.
any help appreciated