aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Models/Exceptions
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Models/Exceptions')
-rw-r--r--src/server/Models/Exceptions/ModelValidationException.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/server/Models/Exceptions/ModelValidationException.cs b/src/server/Models/Exceptions/ModelValidationException.cs
new file mode 100644
index 0000000..3156229
--- /dev/null
+++ b/src/server/Models/Exceptions/ModelValidationException.cs
@@ -0,0 +1,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)
+ {
+ }
+ }
+}