diff --git a/Stormtrooper/Stormtrooper/StorageOverflowException.cs b/Stormtrooper/Stormtrooper/StorageOverflowException.cs new file mode 100644 index 0000000..0caf0f3 --- /dev/null +++ b/Stormtrooper/Stormtrooper/StorageOverflowException.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace Stormtrooper +{ + [Serializable] + internal class StorageOverflowException : ApplicationException + { + public StorageOverflowException(int count) : base($"В наборе превышено допустимое количество: {count}") { } + public StorageOverflowException() : base() { } + public StorageOverflowException(string message) : base(message) { } + public StorageOverflowException(string message, Exception exception) : base(message, exception) { } + protected StorageOverflowException(SerializationInfo info, StreamingContext contex) : base(info, contex) { } + + } +} diff --git a/Stormtrooper/Stormtrooper/StormtrooperNotFoundException.cs b/Stormtrooper/Stormtrooper/StormtrooperNotFoundException.cs new file mode 100644 index 0000000..240c002 --- /dev/null +++ b/Stormtrooper/Stormtrooper/StormtrooperNotFoundException.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 Stormtrooper +{ + [Serializable] + internal class StormtrooperNotFoundException : ApplicationException + { + public StormtrooperNotFoundException(int i) : base($"Не найден объект по позиции {i}") { } + public StormtrooperNotFoundException() : base("Выход за границы") { } + public StormtrooperNotFoundException(string message) : base(message) { } + public StormtrooperNotFoundException(string message, Exception exception) : base(message, exception) { } + protected StormtrooperNotFoundException(SerializationInfo info, StreamingContext contex) : base(info, contex) { } + } +}