ErrorCodeHelper.cs
643 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HHECS.Application.Error
{
/// <summary>
/// 异常编码帮助类
/// </summary>
public class ErrorCodeHelper
{
/// <summary>
/// 格式化错误信息
/// </summary>
/// <param name="errorContent"></param>
/// <param name="errorCode"></param>
/// <returns></returns>
public static string GetErrorStr(ErrorCodeConst errorCode, string errorContent)
{
return $"错误:{errorCode}\n{errorContent}";
}
}
}