mirror of
https://github.com/netchx/netch.git
synced 2026-04-13 20:53:22 +08:00
throw MessageException when Guard.MainFile not found.
This commit is contained in:
@@ -17,15 +17,15 @@ namespace Netch.Controllers
|
||||
{
|
||||
private readonly Timer _flushFileStreamTimer = new(300) {AutoReset = true};
|
||||
|
||||
private FileStream? _logFileStream;
|
||||
|
||||
private StreamWriter? _logStreamWriter;
|
||||
|
||||
/// <summary>
|
||||
/// 日志文件(重定向输出文件)
|
||||
/// </summary>
|
||||
private string LogPath => Path.Combine(Global.NetchDir, $"logging\\{Name}.log");
|
||||
|
||||
private FileStream? _logFileStream;
|
||||
|
||||
private StreamWriter? _logStreamWriter;
|
||||
|
||||
/// <summary>
|
||||
/// 成功启动关键词
|
||||
/// </summary>
|
||||
@@ -107,6 +107,9 @@ namespace Netch.Controllers
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
}
|
||||
};
|
||||
|
||||
if (!File.Exists(Instance.StartInfo.FileName))
|
||||
throw new MessageException(i18N.Translate($"bin\\{MainFile} file not found!"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user