From 87ecc3a66636f232ee0e77eb35920930a508cef2 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:56:38 +0300 Subject: [PATCH] part 2 --- AircraftNotFoundException.java | 15 +++++++++++++++ StorageOverflowException.java | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 AircraftNotFoundException.java create mode 100644 StorageOverflowException.java diff --git a/AircraftNotFoundException.java b/AircraftNotFoundException.java new file mode 100644 index 0000000..d5b5558 --- /dev/null +++ b/AircraftNotFoundException.java @@ -0,0 +1,15 @@ +class AircraftNotFoundException extends RuntimeException +{ + public AircraftNotFoundException(int i) { + super("Не найден объект по позиции " + i); + } + public AircraftNotFoundException() { + super(); + } + public AircraftNotFoundException(String message) { + super(message); + } + public AircraftNotFoundException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/StorageOverflowException.java b/StorageOverflowException.java new file mode 100644 index 0000000..4794fe4 --- /dev/null +++ b/StorageOverflowException.java @@ -0,0 +1,15 @@ +class StorageOverflowException extends RuntimeException +{ + public StorageOverflowException(int count) { + super("В наборе превышено допустимое количество: " + count); + } + public StorageOverflowException() { + super(); + } + public StorageOverflowException(String message) { + super(message); + } + public StorageOverflowException(String message, Throwable cause) { + super(message, cause); + } +}