This commit is contained in:
CortexCore
2024-11-03 16:38:17 +08:00
parent 056e2cada5
commit 4ba741408d
4693 changed files with 2445 additions and 5443 deletions

24
Src/Core/Net/Exception.cs Normal file
View File

@@ -0,0 +1,24 @@
namespace BITKit
{
public class NetOfflineException : System.Exception
{
public NetOfflineException() : base("Client is not connected") { }
}
public class NetAuthorizeException : System.Exception
{
public NetAuthorizeException() : base("Client is not authorized") { }
}
public abstract class NetAuthorityException : System.Exception
{
protected NetAuthorityException(string message =null) : base(string.IsNullOrEmpty(message)?"Authority is not valid":message) { }
}
public class NetClientOnlyException : NetAuthorityException
{
public NetClientOnlyException() : base("This method is only available on client") { }
}
public class NetServerOnlyException : NetAuthorityException
{
public NetServerOnlyException() : base("This method is only available on server") { }
}
}