Добавлены свои классы исключений

This commit is contained in:
Никита Потапов 2023-12-18 12:33:35 +04:00
parent b8d9d10bd8
commit 5a12399986
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package ProjectStormtrooper;
public class PlaneNotFoundException extends RuntimeException {
public PlaneNotFoundException() {
}
public PlaneNotFoundException(String message) {
super(message);
}
public PlaneNotFoundException(String message, Throwable exception) {
super(message, exception);
}
public PlaneNotFoundException(Throwable exception) {
super(exception);
}
protected PlaneNotFoundException(int pos) {
super("Не найден объект по позиции " + pos);
}
}

View File

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