private static bool?LoadBooleanSetting(string setting) { try { return(Invariant.ToBoolean(setting)); } catch (Exception ex) when(ExceptionFilters.SettingsExceptions(ex)) { Logging.LogException(ex.ToString(), Logging.Severity.Low); DisplayMessage.ErrorMessageBox(ex.GetType().Name, $"Unable to load {setting} setting. The default setting will be used."); return(null); } }