using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.Extensions.Localization;
using System;

namespace IRaCIS.Core.Infrastructure
{
    public class BusinessValidationFailedException : Exception
    {

        public ApiResponseCodeEnum Code { get; set; }

        public string LocalizedKey { get; set; }=string.Empty;

        public BusinessValidationFailedException()
        {

        }

        public BusinessValidationFailedException(LocalizedString message, ApiResponseCodeEnum code = ApiResponseCodeEnum.BusinessValidationFailed) : base(message)
        {
			Code = code;
            LocalizedKey=message.Name;

        }

        public BusinessValidationFailedException(string message, ApiResponseCodeEnum code = ApiResponseCodeEnum.BusinessValidationFailed) : base(message)
        {
            Code = code;

        }
    }
}
