提交 e9811558 编写于 作者: T tanghai

修复生成proto错误却不显示具体错误的bug

上级 bfa32202
无法预览此类型文件
无法预览此类型文件
......@@ -27,8 +27,8 @@ namespace ETTools
{
protoc = "protoc";
}
ProcessHelper.Run(protoc, "--csharp_out=\"../Unity/Assets/Model/Module/Message/\" --proto_path=\"./\" OuterMessage.proto");
ProcessHelper.Run(protoc, "--csharp_out=\"../Unity/Assets/Hotfix/Module/Message/\" --proto_path=\"./\" HotfixMessage.proto");
ProcessHelper.Run(protoc, "--csharp_out=\"../Unity/Assets/Model/Module/Message/\" --proto_path=\"./\" OuterMessage.proto", waitExit: true);
ProcessHelper.Run(protoc, "--csharp_out=\"../Unity/Assets/Hotfix/Module/Message/\" --proto_path=\"./\" HotfixMessage.proto", waitExit: true);
// InnerMessage.proto生成cs代码
InnerProto2CS.Proto2CS();
......
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Path = System.IO.Path;
namespace ETModel
{
......@@ -45,8 +46,7 @@ namespace ETModel
process.WaitForExit();
if (process.ExitCode != 0)
{
throw new Exception(process.StandardOutput.ReadToEnd() + process.StandardError.ReadToEnd() + "\n"
+ $"请在terminal中执行,目录{workingDirectory}, 命令{exe} {arguments}");
throw new Exception($"{process.StandardOutput.ReadToEnd()} {process.StandardError.ReadToEnd()}");
}
}
......@@ -54,7 +54,7 @@ namespace ETModel
}
catch (Exception e)
{
throw new Exception($"请在terminal中执行,目录{workingDirectory}, 命令{exe} {arguments}", e);
throw new Exception($"dir: {Path.GetFullPath(workingDirectory)}, command: {exe} {arguments}", e);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册