Skip to content

Commit

Permalink
FIX : 부모 클래스로만 쓰여야 하기 때문에 추상클래스로 변환
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Nov 24, 2023
1 parent 8f055da commit 56d3214
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package org.sopt.sopkerton.common.exception.base;

import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
* == 하위 도메인 예외는 본 Exception 클래스를 상속 받습니다. ==
* 하위 도메인 예외는 본 Exception 클래스를 상속 받습니다.
* - 객체 생
*/
@Getter
public class ExceptionBase extends RuntimeException{
public abstract class ExceptionBase extends RuntimeException{
private static final String ERROR_MESSAGE_HEADER = "ERROR : ";

private final ErrorBase errorBase;
public ExceptionBase(ErrorBase errorBase) {
protected ExceptionBase(ErrorBase errorBase) {
super(ERROR_MESSAGE_HEADER + errorBase.getErrorMessage());
this.errorBase = errorBase;
}
public HttpStatus getStatus() {
return errorBase.getHttpStatus();

public ErrorBase getError() {
return errorBase;
}
}

0 comments on commit 56d3214

Please sign in to comment.