1 Star 0 Fork 0

bosima/TopSdk

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TopException.cs 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
maxinglun 提交于 2023-09-12 08:21 +08:00 . 初版。
using System;
using System.Runtime.Serialization;
namespace Top.Api
{
/// <summary>
/// TOP客户端异常。
/// </summary>
public class TopException : Exception
{
private string errorCode;
private string errorMsg;
private string subErrorCode;
private string subErrorMsg;
public TopException()
: base()
{
}
public TopException(string message)
: base(message)
{
}
protected TopException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
public TopException(string message, Exception innerException)
: base(message, innerException)
{
}
public TopException(string errorCode, string errorMsg)
: base(errorCode + ":" + errorMsg)
{
this.errorCode = errorCode;
this.errorMsg = errorMsg;
}
public TopException(string errorCode, string errorMsg, string subErrorCode, string subErrorMsg)
: base(errorCode + ":" + errorMsg + ":" + subErrorCode + ":" + subErrorMsg)
{
this.errorCode = errorCode;
this.errorMsg = errorMsg;
this.subErrorCode = subErrorCode;
this.subErrorMsg = subErrorMsg;
}
public string ErrorCode
{
get { return this.errorCode; }
}
public string ErrorMsg
{
get { return this.errorMsg; }
}
public string SubErrorCode
{
get { return this.subErrorCode; }
}
public string SubErrorMsg
{
get { return this.subErrorMsg; }
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/bosima/TopSdk.git
git@gitee.com:bosima/TopSdk.git
bosima
TopSdk
TopSdk
main

搜索帮助