更新异常

This commit is contained in:
Mili 2023-02-21 23:30:54 +08:00
parent 60347cf294
commit c6ad7016d3
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame;
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Library.Common.Network;
using Milimoe.FunGame.Core.Library.Constant;
using Milimoe.FunGame.Server.Model;
@ -77,7 +78,7 @@ void StartServer()
if (!DataHelper.Connect())
{
Running = false;
throw new Exception("服务器遇到问题需要关闭,请重新启动服务器!");
throw new ServerErrorException();
}
// 创建监听

View File

@ -72,7 +72,6 @@ namespace Milimoe.FunGame.Server.Model
break;
}
return Send(socket, type, msg);
throw new Exception();
}
catch (Exception e)
{
@ -97,7 +96,7 @@ namespace Milimoe.FunGame.Server.Model
ServerHelper.WriteLine("[" + ServerSocket.GetTypeString(type) + "] " + SocketHelper.MakeClientName(ClientName, User) + " <- " + obj);
return true;
}
throw new Exception("无法向客户端传输消息。");
throw new CanNotSendToClientException();
}
catch (Exception e)
{

View File

@ -69,7 +69,7 @@ namespace Milimoe.FunGame.Server.Utility
}
else
{
throw new Exception("MySQL服务启动失败无法找到MySQL配置文件。");
throw new MySQLConfigException();
}
}
catch (Exception e)