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 1
1
using GameFrameX . Foundation . Json ;
2
+ using GameFrameX . Foundation . Logger ;
2
3
using GameFrameX . Utility . Extensions ;
3
4
4
5
namespace GameFrameX . Utility . Setting ;
@@ -77,13 +78,13 @@ public static void Load(string path)
77
78
/// 2. 不允许传入null值
78
79
/// 3. 会自动校正SaveDataInterval的值,如果小于5000毫秒则使用默认值
79
80
/// </remarks>
80
- /// <exception cref="InvalidOperationException">当CurrentSetting已存在时抛出此异常</exception>
81
81
/// <exception cref="ArgumentNullException">当传入的setting参数为null时抛出此异常</exception>
82
82
public static void SetCurrentSetting ( AppSetting setting )
83
83
{
84
84
if ( CurrentSetting . IsNotNull ( ) )
85
85
{
86
- throw new InvalidOperationException ( "当前设置已经存在,不能再次设置" ) ;
86
+ LogHelper . WarnConsole ( "当前设置已经存在,不能再次设置" ) ;
87
+ return ;
87
88
}
88
89
89
90
ArgumentNullException . ThrowIfNull ( setting , nameof ( setting ) ) ;
You can’t perform that action at this time.
0 commit comments