1. Добавление классов собственных исключений
This commit is contained in:
parent
5a4b922514
commit
83924c620c
19
src/main/java/ArmoredCarNotFoundException.java
Normal file
19
src/main/java/ArmoredCarNotFoundException.java
Normal 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);
|
||||
}
|
||||
}
|
19
src/main/java/StorageOverflowException.java
Normal file
19
src/main/java/StorageOverflowException.java
Normal 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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user