-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#109] Refactor: Custom Exception 구조 생성
- 최상위 CustomException인 BusinessException을 생성하고 그 하위 Exception으로 구조를 변경하였습니다. - User 생성시 validation에 실패하면 발생하는 Exception을 생성하였습니다.
- Loading branch information
Showing
7 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
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
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
9 changes: 9 additions & 0 deletions
9
BE/src/main/java/com/codesquad/team1/signup/common/exception/BusinessException.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.codesquad.team1.signup.common.exception; | ||
|
||
public class BusinessException extends RuntimeException { | ||
|
||
public BusinessException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
3 changes: 2 additions & 1 deletion
3
BE/src/main/java/com/codesquad/team1/signup/common/exception/ForbiddenException.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,8 +1,9 @@ | ||
package com.codesquad.team1.signup.common.exception; | ||
|
||
public class ForbiddenException extends RuntimeException { | ||
public class ForbiddenException extends BusinessException { | ||
|
||
public ForbiddenException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
3 changes: 2 additions & 1 deletion
3
BE/src/main/java/com/codesquad/team1/signup/common/exception/UnauthorizedException.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,8 +1,9 @@ | ||
package com.codesquad.team1.signup.common.exception; | ||
|
||
public class UnauthorizedException extends RuntimeException { | ||
public class UnauthorizedException extends BusinessException { | ||
|
||
public UnauthorizedException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...java/com/codesquad/team1/signup/common/exception/UserCreateParameterInvalidException.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.codesquad.team1.signup.common.exception; | ||
|
||
public class UserCreateParameterInvalidException extends BusinessException { | ||
|
||
public UserCreateParameterInvalidException(String message) { | ||
super(message); | ||
} | ||
|
||
} |
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