first commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace F9WebAiTest.Application.Common.Exceptions;
|
||||
|
||||
/// <summary>资源不存在异常</summary>
|
||||
public class F9NotFoundException : Exception
|
||||
{
|
||||
public F9NotFoundException(string resourceName, object key)
|
||||
: base($"{resourceName}不存在'{key}'。")
|
||||
{
|
||||
}
|
||||
|
||||
public F9NotFoundException(string message) : base(message) { }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace F9WebAiTest.Application.Common.Exceptions;
|
||||
|
||||
/// <summary>操作失败异常</summary>
|
||||
public class F9OperationException : Exception
|
||||
{
|
||||
/// <summary>操作失败</summary>
|
||||
/// <param name="resourceName">资源名称</param>
|
||||
/// <param name="oporation">操作名称</param>
|
||||
public F9OperationException(string resourceName, string oporation)
|
||||
: base($"{resourceName}{oporation}失败。")
|
||||
{
|
||||
}
|
||||
|
||||
public F9OperationException(string message) : base(message) { }
|
||||
}
|
||||
Reference in New Issue
Block a user