File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
GameFrameX.Utility/Setting Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11using GameFrameX . Foundation . Json ;
2+ using GameFrameX . Foundation . Logger ;
23using GameFrameX . Utility . Extensions ;
34
45namespace GameFrameX . Utility . Setting ;
@@ -77,13 +78,13 @@ public static void Load(string path)
7778 /// 2. 不允许传入null值
7879 /// 3. 会自动校正SaveDataInterval的值,如果小于5000毫秒则使用默认值
7980 /// </remarks>
80- /// <exception cref="InvalidOperationException">当CurrentSetting已存在时抛出此异常</exception>
8181 /// <exception cref="ArgumentNullException">当传入的setting参数为null时抛出此异常</exception>
8282 public static void SetCurrentSetting ( AppSetting setting )
8383 {
8484 if ( CurrentSetting . IsNotNull ( ) )
8585 {
86- throw new InvalidOperationException ( "当前设置已经存在,不能再次设置" ) ;
86+ LogHelper . WarnConsole ( "当前设置已经存在,不能再次设置" ) ;
87+ return ;
8788 }
8889
8990 ArgumentNullException . ThrowIfNull ( setting , nameof ( setting ) ) ;
You can’t perform that action at this time.
0 commit comments