-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f055da
commit 56d3214
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
15 changes: 7 additions & 8 deletions
15
src/main/java/org/sopt/sopkerton/common/exception/base/ExceptionBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |