Ejemplo n.º 1
0
        //------------------------------------------------------------------------------
        static public bool Save(ISettingsSerializer serializer,
                                SettingBaseAttribute attr,
                                string settingName, bool secure,
                                object settingValue,
                                FunctionalityHook functionalityHook)
        {
            try
            {
                serializer.Save(settingName, secure, attr, settingValue);
            }
            catch (ExceptionForUser exc)
            {
                InternalConfiguration.PlatformHelper.Log(LogLevel.Error,
                                                         String.Format("Save exception for setting '{0}'", settingName),
                                                         exc.InnerException);

                throw exc.InnerException;
            }
            catch (Exception exc)
            {
                InternalConfiguration.PlatformHelper.Log(LogLevel.Error,
                                                         String.Format("Save exception for setting '{0}'", settingName),
                                                         exc);
                return(false);
            }

            return(true);
        }