修改可空类型

This commit is contained in:
陈淳
2023-01-06 10:15:37 +08:00
parent b7c9b84449
commit 576397a042
29 changed files with 82 additions and 68 deletions

View File

@@ -13,15 +13,15 @@ public class BusinessException : Exception,
{
public ResultCodeEnum Code { get; set; }
public string Details { get; set; }
public string? Details { get; set; }
public LogLevel LogLevel { get; set; }
public BusinessException(
ResultCodeEnum code = ResultCodeEnum.NotSuccess,
string message = null,
string details = null,
Exception innerException = null,
string? message = null,
string? details = null,
Exception? innerException = null,
LogLevel logLevel = LogLevel.Warning)
: base(message, innerException)
{

View File

@@ -2,5 +2,5 @@ namespace Yi.Framework.Common.Exceptions;
public interface IHasErrorDetails
{
string Details { get; }
string? Details { get; }
}

View File

@@ -14,8 +14,8 @@ public class UserFriendlyException : BusinessException
public UserFriendlyException(
string message,
ResultCodeEnum code = ResultCodeEnum.NotSuccess,
string details = null,
Exception innerException = null,
string? details = null,
Exception? innerException = null,
LogLevel logLevel = LogLevel.Warning)
: base(
code,