diff --git a/DumpTruck/DumpTruck/StorageOverException.cs b/DumpTruck/DumpTruck/StorageOverException.cs new file mode 100644 index 0000000..5cc4829 --- /dev/null +++ b/DumpTruck/DumpTruck/StorageOverException.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace DumpTruck.Exceptions +{ + [Serializable] + internal class StorageOverException : ApplicationException + { + public StorageOverException(int count) : base($"В наборе превышено допустимое количество: { count}") { } + public StorageOverException() : base() { } + public StorageOverException(string message) : base(message) { } + public StorageOverException(string message, Exception exception) + : base(message, exception) { } + protected StorageOverException(SerializationInfo info, + StreamingContext contex) : base(info, contex) { } + } +} diff --git a/DumpTruck/DumpTruck/TruckNotFoundException.cs b/DumpTruck/DumpTruck/TruckNotFoundException.cs new file mode 100644 index 0000000..c71851d --- /dev/null +++ b/DumpTruck/DumpTruck/TruckNotFoundException.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace DumpTruck.Exceptions +{ + [Serializable] + internal class TruckNotFoundException : ApplicationException + { + public TruckNotFoundException(int i) : base($"Не найден объект по позиции { i}") { } + public TruckNotFoundException() : base() { } + public TruckNotFoundException(string message) : base(message) { } + public TruckNotFoundException(string message, Exception exception) : base(message, exception) { } + protected TruckNotFoundException(SerializationInfo info, StreamingContext contex) : base(info, contex) { } + } +}