QiFeng.ZWY.Model/Wechat/WxErrorMsgException.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace QiFeng.LMSD.Model.Wechat
{
public class WxErrorMsgException : Exception
{
/// <summary>
/// 初始化自定义异常的新实例
/// </summary>
/// <param name="message">错误消息</param>
/// <param name="operater">操作函数</param>
/// <param name="exceptionTye">自定义异常类型</param>
public WxErrorMsgException(string message, WxErrorMsgExceptionType exceptionTye)
: base(message)
{
ExceptionType = exceptionTye;
}
/// <summary>
/// 初始化自定义异常的新实例
/// </summary>
/// <param name="message">错误消息</param>
/// <param name="innerException">内部异常</param>
/// <param name="operater">操作函数</param>
/// <param name="exceptionTye">导致当前异常的异常</param>
public WxErrorMsgException(string message, Exception innerException, WxErrorMsgExceptionType exceptionTye)
: base(message, innerException)
{
ExceptionType = exceptionTye;
}
/// <summary>
/// 自定义异常类型
/// </summary>
public WxErrorMsgExceptionType ExceptionType { get; private set; }
/// <summary>
/// 获取描述异常的消息
/// </summary>
public override string Message
{
get
{
if (ExceptionType == WxErrorMsgExceptionType.WxErrorException)
{
return base.Message;
}
return string.Format("异常:{0} InnerException:{1}", base.Message,
base.InnerException == null ? "null" : base.InnerException.Message);
}
}
}
/// <summary>
/// 自定义异常类型枚举
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。