summaryrefslogtreecommitdiff
path: root/DesignPatterns/src/app/DesignPatterns.Factory/Exceptions/NegativeMoneyException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'DesignPatterns/src/app/DesignPatterns.Factory/Exceptions/NegativeMoneyException.cs')
-rw-r--r--DesignPatterns/src/app/DesignPatterns.Factory/Exceptions/NegativeMoneyException.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/DesignPatterns/src/app/DesignPatterns.Factory/Exceptions/NegativeMoneyException.cs b/DesignPatterns/src/app/DesignPatterns.Factory/Exceptions/NegativeMoneyException.cs
new file mode 100644
index 0000000..d7d313d
--- /dev/null
+++ b/DesignPatterns/src/app/DesignPatterns.Factory/Exceptions/NegativeMoneyException.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace DesignPatterns.Factory {
+ [Serializable]
+ public class NegativeMoneyException : ArgumentException {
+ public NegativeMoneyException( ) : this( "Cannot create a negative money." ) {}
+
+ public NegativeMoneyException( string message ) : base( message ) {}
+
+ public NegativeMoneyException( string message, Exception innerException ) : base( message, innerException ) {}
+
+ protected NegativeMoneyException( SerializationInfo info, StreamingContext context ) : base( info, context ) {}
+ }
+} \ No newline at end of file