using Siger.Middlelayer.Common.Helpers;
using System;

namespace Siger.Middlelayer.Common
{
    public class BadRequestException : Exception
    {
        public Enum ExceptionEnum { get; private set; }

        public string RequestParameter { get; private set; }

        public BadRequestException(Enum exceptionEnum, object parameter = null)
        {
            ExceptionEnum = exceptionEnum;
            if(parameter != null)
            {
                RequestParameter = JsonHelper.SerializerToJsonString(parameter);
            }
        }
    }
}
