aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Models/Exceptions/ModelValidationException.cs
blob: 3156229bd5d176893ee4d1f6ae1e05e0c4847c24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Runtime.Serialization;
using Dough.Models.Results;

namespace Dough.Models.Exceptions
{
    [Serializable]
    public class ModelValidationException : Exception
    {
        public ErrorResult ErrorResult { get; set; }

        public ModelValidationException()
        {
            ErrorResult = new ErrorResult();
        }

        public ModelValidationException(string message) : base(message)
        {
        }

        public ModelValidationException(string message, Exception inner) : base(message, inner)
        {
        }

        protected ModelValidationException(
            SerializationInfo info,
            StreamingContext context) : base(info, context)
        {
        }
    }
}