﻿using System;
using System.Collections.Generic;
using DAG.Fody.ArgumentNullGuard;

namespace DAG.Project.Abstractions.Business
{
    public class BusinessException : Exception
    {
        public BusinessException([NotNull] string error)
        {
            this.Errors = new[] {error};
        }

        public BusinessException([NotNull] IEnumerable<string> errors)
        {
            this.Errors = errors;
        }

        public IEnumerable<string> Errors { get; private set; }
    }
}