2023-01-01 23:51:05 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
using Yi.Framework.Common.Enum;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.Common.Exceptions;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// <20>û<EFBFBD><C3BB>Ѻ<EFBFBD><D1BA>쳣
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
|
public class UserFriendlyException : BusinessException
|
|
|
|
|
|
{
|
|
|
|
|
|
public UserFriendlyException(
|
|
|
|
|
|
string message,
|
|
|
|
|
|
ResultCodeEnum code = ResultCodeEnum.NotSuccess,
|
2023-01-06 10:15:37 +08:00
|
|
|
|
string? details = null,
|
|
|
|
|
|
Exception? innerException = null,
|
2023-01-01 23:51:05 +08:00
|
|
|
|
LogLevel logLevel = LogLevel.Warning)
|
|
|
|
|
|
: base(
|
|
|
|
|
|
code,
|
|
|
|
|
|
message,
|
|
|
|
|
|
details,
|
|
|
|
|
|
innerException,
|
|
|
|
|
|
logLevel)
|
|
|
|
|
|
{
|
|
|
|
|
|
Details = details;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// <20><><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9>캯<EFBFBD><ECBAAF>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public UserFriendlyException(SerializationInfo serializationInfo, StreamingContext context)
|
|
|
|
|
|
: base(serializationInfo, context)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|