优化了输出提示

This commit is contained in:
fengjiayi
2024-12-10 23:58:49 +08:00
parent 0f46b7ef63
commit dbbaa10cc0
11 changed files with 84 additions and 49 deletions

View File

@@ -256,6 +256,7 @@ namespace Serein.Library
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"节点Guid{this.NodeModel.Guid}");
sb.AppendLine($"方法别名:{this.MethodAnotherName}");
sb.AppendLine($"方法名称:{this.MethodName}");
sb.AppendLine($"需要实例:{this.ActingInstanceType?.FullName}");

View File

@@ -262,7 +262,7 @@ namespace Serein.Library
catch (Exception ex)
{
newFlowData = null;
context.Env.WriteLine(InfoType.ERROR,$"节点[{this.Guid}]异常:" + ex);
context.Env.WriteLine(InfoType.ERROR, $"节点[{currentNode.Guid}]异常:" + ex);
context.NextOrientation = ConnectionInvokeType.IsError;
context.ExceptionOfRuning = ex;
}
@@ -400,7 +400,7 @@ namespace Serein.Library
#region []
object inputParameter; // 存放解析的临时参数
if (pd.IsExplicitData && !pd.DataValue.StartsWith("@get", StringComparison.OrdinalIgnoreCase)) // 判断是否使用显示的输入参数
if (pd.IsExplicitData && !pd.DataValue.StartsWith("@", StringComparison.OrdinalIgnoreCase)) // 判断是否使用显示的输入参数
{
// 使用输入的固定值
inputParameter = pd.DataValue;
@@ -447,14 +447,7 @@ namespace Serein.Library
#endregion
}
#region null检查
if (!argDataType.IsValueType && inputParameter is null)
{
parameters[i] = null;
throw new Exception($"[arg{pd.Index}][{pd.Name}][{argDataType}]参数不能为null");
// continue;
}
#endregion
#region @Get / @DTC Data type conversion / @Data ()
if (pd.IsExplicitData)
@@ -480,7 +473,15 @@ namespace Serein.Library
}
#endregion
#region null检查
if (!argDataType.IsValueType && inputParameter is null)
{
parameters[i] = null;
throw new Exception($"[arg{pd.Index}][{pd.Name}][{argDataType}]参数不能为null");
continue;
}
#endregion
#endregion