public void PopulateDictionary(IDictionary <string, object> dict) { string value; try { value = debugUtils.GetStackTraceWithSourceInfo(new StackTrace(true)); } catch (SecurityException) { value = String.Format(Resources.Culture, Resources.ExtendedPropertyError, Resources.DebugInfo_StackTraceSecurityException); } catch { value = String.Format(Resources.Culture, Resources.ExtendedPropertyError, Resources.DebugInfo_StackTraceException); } dict.Add(Resources.DebugInfo_StackTrace, value); }
/// <summary> /// Populates an <see cref="IDictionary"/> with helpful diagnostic information. /// </summary> /// <param name="dict">Dictionary used to populate the <see cref="DebugInformationProvider"></see></param> public void PopulateDictionary(IDictionary dict) { string value; try { value = debugUtils.GetStackTraceWithSourceInfo(new StackTrace(true)); } catch (SecurityException) { value = SR.ExtendedPropertyError(SR.DebugInfo_StackTraceSecurityException); } catch { value = SR.ExtendedPropertyError(SR.DebugInfo_StackTraceException); } dict.Add(SR.DebugInfo_StackTrace, value); }