diff --git a/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs index eae2636590..df24a42fb5 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ServerCreationLogic.cs @@ -119,13 +119,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic { Game.CreateServer(settings); } - catch (System.Net.Sockets.SocketException) + catch (System.Net.Sockets.SocketException e) { - ConfirmationDialogs.CancelPrompt( - "Server Creation Failed", - "Could not listen on port {0}.\n\nCheck if the port is already being used.".F(Game.Settings.Server.ListenPort), - cancelText: "OK"); + var err_msg = "Could not listen on port {0}.".F(Game.Settings.Server.ListenPort); + if (e.ErrorCode == 10048) { // AddressAlreadyInUse (WSAEADDRINUSE) + err_msg += "\n\nCheck if the port is already being used."; + } else { + err_msg += "\n\nError is: \"{0}\" ({1})".F(e.Message, e.ErrorCode); + } + ConfirmationDialogs.CancelPrompt("Server Creation Failed", err_msg, cancelText: "OK"); return; }