From 54a57600a46b7bc5929b03b0fb78079edc5f5637 Mon Sep 17 00:00:00 2001 From: malimova Date: Sun, 10 Dec 2023 20:56:51 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20StorageOverflowException?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/PlaneNotFoundException.cs | 1 + .../AirBomber/StorageOverflowException.cs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 AirBomber/AirBomber/StorageOverflowException.cs diff --git a/AirBomber/AirBomber/PlaneNotFoundException.cs b/AirBomber/AirBomber/PlaneNotFoundException.cs index 0f5c7e6..211f8a9 100644 --- a/AirBomber/AirBomber/PlaneNotFoundException.cs +++ b/AirBomber/AirBomber/PlaneNotFoundException.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; namespace AirBomber { + [Serializable] internal class PlaneNotFoundException: ApplicationException { public PlaneNotFoundException(int i) : base($"Не найден объект по позиции {i}") { } diff --git a/AirBomber/AirBomber/StorageOverflowException.cs b/AirBomber/AirBomber/StorageOverflowException.cs new file mode 100644 index 0000000..32e408b --- /dev/null +++ b/AirBomber/AirBomber/StorageOverflowException.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 AirBomber +{ + [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) { } + } +}