From f3a61092ebfbad1b0a91ab76272258b18a7fb625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC=20=D0=A5=D0=B0=D1=80=D0=BB?= =?UTF-8?q?=D0=B0=D0=BC=D0=BE=D0=B2?= <xarlamov_2000@list.ru> Date: Sat, 17 Dec 2022 15:43:16 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=BE=D0=B2?= =?UTF-8?q?-=D0=BD=D0=B0=D1=81=D0=BB=D0=B5=D0=B4=D0=BD=D0=B8=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=BE=D1=82=20Exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Stormtrooper/StorageOverflowException.cs | 20 +++++++++++++++++++ .../StormtrooperNotFoundException.cs | 19 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Stormtrooper/Stormtrooper/StorageOverflowException.cs create mode 100644 Stormtrooper/Stormtrooper/StormtrooperNotFoundException.cs 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) { } + } +}