void Load() { exceptionService.RestoreDefaults(); var section = settingsService.GetOrCreateSection(SETTINGS_GUID); foreach (var exx in section.SectionsWithName("Exception")) { var exceptionType = exx.Attribute <ExceptionType?>("ExceptionType"); var fullName = exx.Attribute <string>("FullName"); bool?breakOnFirstChance = exx.Attribute <bool?>("BreakOnFirstChance"); bool isOtherExceptions = exx.Attribute <bool?>("IsOtherExceptions") ?? false; var diffType = exx.Attribute <ExceptionDiffType?>("DiffType"); if (diffType == null) { continue; } if (exceptionType == null || exceptionType.Value < 0 || exceptionType.Value >= ExceptionType.Last) { continue; } if (fullName == null) { continue; } var key = new ExceptionInfoKey(exceptionType.Value, fullName); switch (diffType.Value) { case ExceptionDiffType.Remove: exceptionService.Remove(key); break; case ExceptionDiffType.AddOrUpdate: if (breakOnFirstChance == null) { continue; } exceptionService.AddOrUpdate(key, breakOnFirstChance.Value, isOtherExceptions); break; default: Debug.Fail("Unknown ExceptionDiffType"); break; } } }