Missing exception property on ServerStatusUpdateEventArgs
parent
9f4e0b5fe3
commit
835a013bad
|
@ -37,12 +37,18 @@ namespace LANCommander.Services
|
||||||
{
|
{
|
||||||
public Server Server { get; private set; }
|
public Server Server { get; private set; }
|
||||||
public ServerProcessStatus Status { get; private set; }
|
public ServerProcessStatus Status { get; private set; }
|
||||||
|
public Exception Exception { get; private set; }
|
||||||
|
|
||||||
public ServerStatusUpdateEventArgs(Server server, ServerProcessStatus status)
|
public ServerStatusUpdateEventArgs(Server server, ServerProcessStatus status)
|
||||||
{
|
{
|
||||||
Server = server;
|
Server = server;
|
||||||
Status = status;
|
Status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ServerStatusUpdateEventArgs(Server server, ServerProcessStatus status, Exception exception) : this(server, status)
|
||||||
|
{
|
||||||
|
Exception = exception;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LogFileMonitor : IDisposable
|
public class LogFileMonitor : IDisposable
|
||||||
|
@ -197,7 +203,7 @@ namespace LANCommander.Services
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
OnStatusUpdate?.Invoke(this, new ServerStatusUpdateEventArgs(server, ServerProcessStatus.Error));
|
OnStatusUpdate?.Invoke(this, new ServerStatusUpdateEventArgs(server, ServerProcessStatus.Error, ex));
|
||||||
|
|
||||||
Logger.Error(ex, "Could not start server process");
|
Logger.Error(ex, "Could not start server process");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue