v1.2.6.0 (Winter Update)

This commit is contained in:
Regalis11
2023-12-14 16:11:27 +02:00
parent af8cc89fce
commit b91e85559d
375 changed files with 7771 additions and 2874 deletions
@@ -131,6 +131,7 @@ namespace Barotrauma.Networking
catch (AggregateException aggregateException)
{
if (aggregateException.InnerException is OperationCanceledException) { return Option<int>.None(); }
CheckPipeConnected(nameof(readStream), readStream);
throw;
}
catch (OperationCanceledException)
@@ -161,7 +162,18 @@ namespace Barotrauma.Networking
{
if (status is StatusEnum.Active && pipe is not { IsConnected: true })
{
throw new Exception($"{name} was disconnected unexpectedly");
string exceptionMsg = $"{name} was disconnected unexpectedly.";
#if CLIENT
if (Process is { HasExited: true, ExitCode: var exitCode })
{
exceptionMsg += $" Child process exit code was {(uint)exitCode:X8}.";
}
else if (Process is { HasExited: false })
{
exceptionMsg += " Child process has not exited.";
}
#endif
throw new Exception(exceptionMsg);
}
}
@@ -256,7 +268,11 @@ namespace Barotrauma.Networking
{
case ObjectDisposedException _:
case System.IO.IOException _:
if (!HasShutDown) { throw; }
if (!HasShutDown)
{
CheckPipeConnected(nameof(writeStream), writeStream);
throw;
}
break;
default:
throw;