From cc6f93ae1c2cfba76f6515d0e2f6f705c55b14f0 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 16 Jan 2026 01:05:10 +0100 Subject: [PATCH] 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. --- .../Exceptions/DeleteObjectFailedException.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/ReC.Application/Common/Exceptions/DeleteObjectFailedException.cs diff --git a/src/ReC.Application/Common/Exceptions/DeleteObjectFailedException.cs b/src/ReC.Application/Common/Exceptions/DeleteObjectFailedException.cs new file mode 100644 index 0000000..92325f1 --- /dev/null +++ b/src/ReC.Application/Common/Exceptions/DeleteObjectFailedException.cs @@ -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; + } +}