Skip to content

Improve error messages when IO fails #144

@NicEastvillage

Description

@NicEastvillage

Error messages sometimes look like this

15:35:06 ERROR RLBotServer  FlatBuffersServer: Error while handling server: System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Net.Sockets.Socket>.GetResult(Int16) + 0xef
   at System.Net.Sockets.TcpListener.<<AcceptTcpClientAsync>gWaitAndWrap|32_0>d.MoveNext() + 0x151
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x62
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at RLBotCS.Server.FlatBuffersServer.<HandleServer>d4.MoveNext() + 0x385
15:35:07  INFO RLBotServer               Main: Shutting down server...
15:35:07  INFO RLBotServer               Main: TCP handler has shut down successfully.
15:35:07  INFO RLBotServer               Main: Bridge handler has shut down successfully.
15:35:07  INFO RLBotServer               Main: Server shut down successfully.

(from https://discord.com/channels/348658686962696195/1460734121822392463/1460734121822392463)

or like this

15:30:10 ERROR RLBotServer  FlatBuffersServer: Error while handling server: System.Net.Sockets.SocketException (98): Address already in use
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError, Boolean, String) + 0x9e
   at System.Net.Sockets.Socket.DoBind(EndPoint, SocketAddress) + 0x18a
   at System.Net.Sockets.Socket.Bind(EndPoint) + 0x5a
   at System.Net.Sockets.TcpListener.Start(Int32) + 0x3b
   at RLBotCS.Server.FlatBuffersServer.<HandleServer>d__4.MoveNext() + 0xa7

(from https://discord.com/channels/348658686962696195/1459193973209043170/1459193973209043170)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions