A:调整日志框架和整体项目配置

This commit is contained in:
jimmy committed 2025-05-28 23:45:13 +08:00
1 parent 91b45955fe
commit 807e33eb60
7 files changed
+193 -62

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
namespace Common.ExpandException;
public class ExceptionExpand : Exception
{
/// <summary>
/// 默认异常编码
/// </summary>
private const long DefaultCode = -1;
public string ErrorMessage { get; private set; } = "";
public long ErrorCode { get; private set; } = DefaultCode;
public string Suggestion { get; private set; } = "";
private ExceptionExpand()
{
}
public ExceptionExpand(long errorCode, string massage, string solution) : base(
massage)
{
ErrorCode = errorCode;
Suggestion = solution;
}
public ExceptionExpand(long errorCode, string massage, string solution, Exception? innerException) : base(
massage, innerException)
{
ErrorCode = errorCode;
Suggestion = solution;
}
public override string ToString()
{
return $"Error Code: {ErrorCode}\nMessage: {Message}\nSuggestion: {Suggestion}\n{base.ToString()}";
}
}