优化了SereinEnv.WriteLine(Exception, InfoClass)输出,可以通过更改InfoClass控制是否输出异常堆栈信息。

优化了批量加载节点时,脚本节点类型分析异常的问题。
This commit is contained in:
fengjiayi
2025-07-17 22:46:40 +08:00
parent 550122208d
commit 88de5a21f5
13 changed files with 113 additions and 36 deletions

View File

@@ -248,7 +248,7 @@ namespace Serein.Library.Web
catch (Exception ex1)
{
SereinEnv.WriteLine(InfoType.ERROR, ex1.ToString());
SereinEnv.WriteLine(ex1);
}
}

View File

@@ -135,7 +135,7 @@ namespace Serein.Library.Web
}
catch (Exception ex)
{
SereinEnv.WriteLine(InfoType.ERROR, ex.ToString());
SereinEnv.WriteLine(ex);
}
}

View File

@@ -132,7 +132,16 @@ namespace Serein.Library
/// <param name="class"></param>
public static void WriteLine(Exception ex, InfoClass @class = InfoClass.General)
{
SereinEnv.environment.WriteLine(InfoType.ERROR, ex.ToString(), @class);
if(@class == InfoClass.Trivial)
{
SereinEnv.environment.WriteLine(InfoType.ERROR, ex.ToString(), @class);
}
else
{
SereinEnv.environment.WriteLine(InfoType.ERROR, ex.Message, @class);
}
}