using System;
using BO.AppServer.Metadata.Enums;
using Quadarax.Foundation.Core.Exceptions;

namespace BO.AppServer.Business.Exceptions
{
    public class InvalidDocumentStateException : CodeException
    {
        private const string CS_MESSAGE = "Invalid document '{0}' [{1}] state '{2}' for operation '{3}'. Operation cancelled.";
        private const int CN_CODE = 1500;

        public InvalidDocumentStateException(string name,long id, DocumentStatusEnum status,string operation, Exception innerException) : base(CN_CODE, string.Format(CS_MESSAGE,  name, id, status, operation), innerException)
        {
        }

        public InvalidDocumentStateException(string name,long id, DocumentStatusEnum status,string operation) : base(CN_CODE, string.Format(CS_MESSAGE,  name, id, status, operation))
        {
        }
    }
}
