feat: added errors
This commit is contained in:
parent
a7aa93c82c
commit
90aaab219d
@ -0,0 +1,8 @@
|
|||||||
|
package com.example.nto.domain.exception;
|
||||||
|
|
||||||
|
public class AccessDeniedException extends RuntimeException {
|
||||||
|
public AccessDeniedException(String message) {
|
||||||
|
// Доступ запрещен.
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package com.example.nto.domain.exception;
|
||||||
|
|
||||||
|
public class ConflictResourceException extends RuntimeException {
|
||||||
|
public ConflictResourceException(String message) {
|
||||||
|
// Вызывается, когда данные в таблицах конфликтуют.
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package com.example.nto.domain.exception;
|
||||||
|
|
||||||
|
public class ImageSendException extends RuntimeException {
|
||||||
|
public ImageSendException(String message) {
|
||||||
|
// Вызывается при ошибке во время отправки изображения.
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.example.nto.domain.exception;
|
||||||
|
|
||||||
|
public class ImageUploadException extends RuntimeException {
|
||||||
|
public ImageUploadException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package com.example.nto.domain.exception;
|
||||||
|
|
||||||
|
public class ResourceNotFoundException extends RuntimeException {
|
||||||
|
public ResourceNotFoundException(String message) {
|
||||||
|
// Вызывается, когда что-то не найдено в бд.
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user