Add UpdateObjectFailedException for update operation errors

A new exception class, `UpdateObjectFailedException`, was added to the `ReC.Application.Common.Exceptions` namespace to handle failures during update operations.

The class includes a `Procedure` property of type `UpdateObjectProcedure` to store the associated procedure. It provides three constructors to support different levels of detail: one with just the procedure, one with a procedure and a custom message, and one with a procedure, a custom message, and an inner exception.

The `UpdateObjectProcedure` type is referenced from the `ReC.Application.Common.Procedures.UpdateProcedure` namespace, which is now included via a `using` directive.
This commit is contained in:
Developer 02
2026-01-16 00:57:37 +01:00
parent 538abec212
commit c56bcc198e

View File

@@ -0,0 +1,23 @@
using ReC.Application.Common.Procedures.UpdateProcedure;
namespace ReC.Application.Common.Exceptions;
public class UpdateObjectFailedException : Exception
{
public UpdateObjectProcedure Procedure { get; }
public UpdateObjectFailedException(UpdateObjectProcedure procedure) : base()
{
Procedure = procedure;
}
public UpdateObjectFailedException(UpdateObjectProcedure procedure, string? message) : base(message)
{
Procedure = procedure;
}
public UpdateObjectFailedException(UpdateObjectProcedure procedure, string? message, Exception? innerException) : base(message, innerException)
{
Procedure = procedure;
}
}