1. Добавление классов собственных исключений

This commit is contained in:
prodigygirl 2022-12-03 15:40:52 +04:00
parent 5a4b922514
commit 83924c620c
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,19 @@
public class ArmoredCarNotFoundException extends RuntimeException{
public ArmoredCarNotFoundException() {
}
public ArmoredCarNotFoundException(int i) {
super("Не найден объект по позиции " + i);
}
public ArmoredCarNotFoundException(String message) {
super(message);
}
public ArmoredCarNotFoundException(String message, Throwable cause) {
super(message, cause);
}
public ArmoredCarNotFoundException(Throwable cause) {
super(cause);
}
}

View File

@ -0,0 +1,19 @@
public class StorageOverflowException extends RuntimeException{
public StorageOverflowException() {
}
public StorageOverflowException(String message) {
super(message);
}
public StorageOverflowException(int count) {
super("В наборе превышено допустимое количество: " + count);
}
public StorageOverflowException(String message, Throwable cause) {
super(message, cause);
}
public StorageOverflowException(Throwable cause) {
super(cause);
}
}