Add DeleteObjectFailedException for delete operation errors
A new `DeleteObjectFailedException` class was introduced in the `ReC.Application.Common.Exceptions` namespace to handle errors related to failed delete operations. This class includes: - A `Procedure` property of type `DeleteObjectProcedure` to provide context about the failed operation. - Three constructors to support different levels of detail (procedure only, procedure with a message, and procedure with a message and inner exception). Additionally, a `using` directive for the `ReC.Application.Common.Procedures.DeleteProcedure` namespace was added to support the `DeleteObjectProcedure` type.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using ReC.Application.Common.Procedures.DeleteProcedure;
|
||||
|
||||
namespace ReC.Application.Common.Exceptions;
|
||||
|
||||
public class DeleteObjectFailedException : Exception
|
||||
{
|
||||
public DeleteObjectProcedure Procedure { get; }
|
||||
|
||||
public DeleteObjectFailedException(DeleteObjectProcedure procedure) : base()
|
||||
{
|
||||
Procedure = procedure;
|
||||
}
|
||||
|
||||
public DeleteObjectFailedException(DeleteObjectProcedure procedure, string? message) : base(message)
|
||||
{
|
||||
Procedure = procedure;
|
||||
}
|
||||
|
||||
public DeleteObjectFailedException(DeleteObjectProcedure procedure, string? message, Exception? innerException) : base(message, innerException)
|
||||
{
|
||||
Procedure = procedure;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user