-
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.
refactor: 프로젝트 도메인의 사용자에게 반환할 에러 메시지에 대한 책임을 사용자 정의 예외로 이동 (#105)
- Loading branch information
Showing
31 changed files
with
170 additions
and
122 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
8 changes: 3 additions & 5 deletions
8
src/main/java/es/princip/getp/domain/people/exception/NotFoundPeopleException.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,16 +1,14 @@ | ||
package es.princip.getp.domain.people.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
import org.springframework.http.HttpStatus; | ||
import es.princip.getp.infra.exception.NotFoundException; | ||
|
||
public class NotFoundPeopleException extends BusinessLogicException { | ||
public class NotFoundPeopleException extends NotFoundException { | ||
|
||
private static final HttpStatus status = HttpStatus.NOT_FOUND; | ||
private static final String code = "NOT_FOUND_PEOPLE"; | ||
private static final String message = "존재하지 않는 피플입니다."; | ||
|
||
public NotFoundPeopleException() { | ||
super(status, ErrorDescription.of(code, message)); | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
8 changes: 3 additions & 5 deletions
8
src/main/java/es/princip/getp/domain/people/exception/NotFoundPeopleProfileException.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,16 +1,14 @@ | ||
package es.princip.getp.domain.people.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
import org.springframework.http.HttpStatus; | ||
import es.princip.getp.infra.exception.NotFoundException; | ||
|
||
public class NotFoundPeopleProfileException extends BusinessLogicException { | ||
public class NotFoundPeopleProfileException extends NotFoundException { | ||
|
||
private static final HttpStatus status = HttpStatus.NOT_FOUND; | ||
private static final String code = "NOT_FOUND_PEOPLE_PROFILE"; | ||
private static final String message = "존재하지 않는 피플 프로필입니다."; | ||
|
||
public NotFoundPeopleProfileException() { | ||
super(status, ErrorDescription.of(code, message)); | ||
super(ErrorDescription.of(code, 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
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
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
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
14 changes: 14 additions & 0 deletions
14
src/main/java/es/princip/getp/domain/project/exception/AlreadyLikedProjectException.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,14 @@ | ||
package es.princip.getp.domain.project.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
|
||
public class AlreadyLikedProjectException extends BusinessLogicException { | ||
|
||
private static final String code = "ALREADY_LIKED_PROJECT"; | ||
private static final String message = "이미 좋아요를 누른 프로젝트입니다."; | ||
|
||
public AlreadyLikedProjectException() { | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
...in/java/es/princip/getp/domain/project/exception/ApplicationDurationIsEndedException.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...tp/domain/project/exception/ApplicationDurationIsNotBeforeEstimatedDurationException.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...getp/domain/project/exception/ApplicationDurationNotBeforeEstimatedDurationException.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,14 @@ | ||
package es.princip.getp.domain.project.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
|
||
public class ApplicationDurationNotBeforeEstimatedDurationException extends BusinessLogicException { | ||
|
||
private static final String code = "APPLICATION_DURATION_NOT_BEFORE_ESTIMATED_DURATION"; | ||
private static final String message = "지원자 모집 기간은 예상 작업 기간보다 이전이어야 합니다."; | ||
|
||
public ApplicationDurationNotBeforeEstimatedDurationException() { | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...main/java/es/princip/getp/domain/project/exception/ClosedProjectApplicationException.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,14 @@ | ||
package es.princip.getp.domain.project.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
|
||
public class ClosedProjectApplicationException extends BusinessLogicException { | ||
|
||
private static final String code = "CLOSED_PROJECT_APPLICATION"; | ||
private static final String message = "해당 프로젝트의 지원자 모집이 닫혔습니다."; | ||
|
||
public ClosedProjectApplicationException() { | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...main/java/es/princip/getp/domain/project/exception/EndedApplicationDurationException.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,14 @@ | ||
package es.princip.getp.domain.project.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
|
||
public class EndedApplicationDurationException extends BusinessLogicException { | ||
|
||
private static final String code = "ENDED_APPLICATION_DURATION"; | ||
private static final String message = "지원자 모집 기간은 금일부터거나 이후여야 합니다."; | ||
|
||
public EndedApplicationDurationException() { | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/es/princip/getp/domain/project/exception/NeverLikedProjectException.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,14 @@ | ||
package es.princip.getp.domain.project.exception; | ||
|
||
import es.princip.getp.infra.exception.BusinessLogicException; | ||
import es.princip.getp.infra.exception.ErrorDescription; | ||
|
||
public class NeverLikedProjectException extends BusinessLogicException { | ||
|
||
private static final String code = "NEVER_LIKED_PROJECT"; | ||
private static final String message = "좋아요를 누르지 않은 프로젝트입니다."; | ||
|
||
public NeverLikedProjectException() { | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/es/princip/getp/domain/project/exception/NotFoundProjectException.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,14 @@ | ||
package es.princip.getp.domain.project.exception; | ||
|
||
import es.princip.getp.infra.exception.ErrorDescription; | ||
import es.princip.getp.infra.exception.NotFoundException; | ||
|
||
public class NotFoundProjectException extends NotFoundException { | ||
|
||
private static final String code = "NOT_FOUND_PROJECT"; | ||
private static final String message = "존재하지 않는 프로젝트입니다."; | ||
|
||
public NotFoundProjectException() { | ||
super(ErrorDescription.of(code, message)); | ||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
src/main/java/es/princip/getp/domain/project/exception/ProjectAlreadyLikedException.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...main/java/es/princip/getp/domain/project/exception/ProjectApplicationClosedException.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/main/java/es/princip/getp/domain/project/exception/ProjectNeverLikedException.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.