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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user