shoc-backend/SeaHaven.Services/Exceptions/WorkOrderBoardExceptions.cs

25 lines
691 B
C#

using SeaHaven.Services.DTOs;
namespace SeaHaven.Services.Exceptions
{
public class WorkOrderBoardValidationException : Exception
{
public WorkOrderBoardValidationException(string code, string message) : base(message)
{
Code = code;
}
public string Code { get; }
}
public class WorkOrderBoardConcurrencyException : Exception
{
public WorkOrderBoardConcurrencyException(WorkOrderBoardRowDto? currentState)
: base("The record was modified by another user. Refresh and retry.")
{
CurrentState = currentState;
}
public WorkOrderBoardRowDto? CurrentState { get; }
}
}