0

Error log captured the error Group Cannot Be Found at this part of the code.

private void GetTreeView(PRDConfig.System SelectedSystem = PRDConfig.System.PRD)
{
    try
    {
        using (SPMonitoredScope scope = new SPMonitoredScope("[{0}]{1}".FormatWith(Location, System.Reflection.MethodBase.GetCurrentMethod().Name)))
        {
            var filePlan = new Mensa.CommonLibrary.FilePlan();
            var FilePlanList = SPHelper.GetListByUrl(PRDConfig.GetString(PRDConfig.Config.FilePlanList,SelectedSystem));
            var listCollection = SortByTitle ? filePlan.GetSortByTitleFilePlan(SelectedSystem) : filePlan.GetSortByReferenceFilePlan(SelectedSystem);

            //Last inserted log
            Log.LogDebug("GetListByUrl : " + PRDConfig.GetString(PRDConfig.Config.FilePlanList, SelectedSystem), Location);

            if (Page.IsPostBack)
                tvFilePlan.Nodes.Clear();

            foreach (SPListItem item in listCollection)
            {
                if (item != null)
                {
                    var node = GetFormattedNode(FilePlanList, item.Folder);
                    tvFilePlan.Nodes.Add(node);
                }
            }
        }
    }
    catch (Exception ex)
    {
        ex.PreserveStackTrace();
        throw;
    }
}

I'm unsure which line caused the error of Group not found, so I would like to insert more logging.

How can I view the groups that are being checked after the last inserted log?

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.