Files
TouchSocket/RRQMCore/Exceptions/RRQMCoreExceptions.cs
2022-03-20 10:51:15 +08:00

121 lines
3.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//------------------------------------------------------------------------------
// 此代码版权除特别声明或在RRQMCore.XREF命名空间的代码归作者本人若汝棋茗所有
// 源代码使用协议遵循本仓库的开源协议及附加协议若本仓库没有设置则按MIT开源协议授权
// CSDN博客https://blog.csdn.net/qq_40374647
// 哔哩哔哩视频https://space.bilibili.com/94253567
// Gitee源代码仓库https://gitee.com/RRQM_Home
// Github源代码仓库https://github.com/RRQM
// API首页https://www.yuque.com/eo2w71/rrqm
// 交流QQ群234762506
// 感谢您的下载和使用
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
using System;
namespace RRQMCore
{
/// <summary>
/// 若汝棋茗程序集异常类基类
/// </summary>
[Serializable]
public class RRQMException : Exception
{
/// <summary>
/// 构造函数
/// </summary>
public RRQMException() : base()
{
}
/// <summary>
/// 构造函数
/// </summary>
public RRQMException(ResType resType, params object[] fms) : base(resType.GetResString(fms)) { }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message"></param>
public RRQMException(string message) : base(message) { }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message"></param>
/// <param name="inner"></param>
public RRQMException(string message, System.Exception inner) : base(message, inner) { }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected RRQMException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
/// <summary>
/// 消息已注册
/// </summary>
[Serializable]
public class MessageRegisteredException : RRQMException
{
/// <summary>
///构造函数
/// </summary>
/// <param name="mes"></param>
public MessageRegisteredException(string mes) : base(mes)
{
}
}
/// <summary>
/// 未找到消息异常类
/// </summary>
[Serializable]
public class MessageNotFoundException : RRQMException
{
/// <summary>
///构造函数
/// </summary>
/// <param name="mes"></param>
public MessageNotFoundException(string mes) : base(mes)
{
}
}
/// <summary>
/// 内存块已释放
/// </summary>
[Serializable]
public class ByteBlockDisposedException : RRQMException
{
/// <summary>
/// 构造函数
/// </summary>
public ByteBlockDisposedException() { }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message"></param>
public ByteBlockDisposedException(string message) : base(message) { }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="message"></param>
/// <param name="inner"></param>
public ByteBlockDisposedException(string message, Exception inner) : base(message, inner) { }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected ByteBlockDisposedException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
}