-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFeedException.java
More file actions
29 lines (20 loc) · 892 Bytes
/
FeedException.java
File metadata and controls
29 lines (20 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package ddingdong.ddingdongBE.common.exception;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.http.HttpStatus.NOT_FOUND;
public class FeedException extends CustomException {
public FeedException(String message, int errorCode) {
super(message, errorCode);
}
public static final class CommentNotFoundException extends FeedException {
private static final String MESSAGE = "존재하지 않는 댓글입니다.";
public CommentNotFoundException() {
super(MESSAGE, NOT_FOUND.value());
}
}
public static final class CommentAccessDeniedException extends FeedException {
private static final String MESSAGE = "댓글을 삭제할 권한이 없습니다.";
public CommentAccessDeniedException() {
super(MESSAGE, FORBIDDEN.value());
}
}
}