Added own exceptions
This commit is contained in:
parent
8abded35c8
commit
bbb24c454f
21
ArtilleryNotFoundException.java
Normal file
21
ArtilleryNotFoundException.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
public class ArtilleryNotFoundException extends RuntimeException {
|
||||||
|
public ArtilleryNotFoundException() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArtilleryNotFoundException(int i) {
|
||||||
|
super("Не найден объект по позиции " + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArtilleryNotFoundException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArtilleryNotFoundException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArtilleryNotFoundException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
}
|
19
StorageOverflowException.java
Normal file
19
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…
Reference in New Issue
Block a user