1
This commit is contained in:
24
Src/Core/Net/Exception.cs
Normal file
24
Src/Core/Net/Exception.cs
Normal 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") { }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user