-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REFACTOR(exception) :: custom errorcode 삭제 및 spring 제공 Status 사용
- Loading branch information
1 parent
f4e8ba1
commit 004e408
Showing
65 changed files
with
177 additions
and
284 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
11 changes: 5 additions & 6 deletions
11
...ain/java/com/woongeya/zoing/domain/application/exception/AlreadyApplicationException.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,13 +1,12 @@ | ||
package com.woongeya.zoing.domain.application.exception; | ||
|
||
import com.woongeya.zoing.global.error.exception.ErrorCode; | ||
import com.woongeya.zoing.global.error.JJoingException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
public class AlreadyApplicationException extends JJoingException { | ||
import com.woongeya.zoing.global.exception.JJoingException; | ||
|
||
public static final JJoingException EXCEPTION = new AlreadyApplicationException(); | ||
public class AlreadyApplicationException extends JJoingException { | ||
|
||
public AlreadyApplicationException() { | ||
super(ErrorCode.ALREADY_APPLICATION); | ||
public AlreadyApplicationException(Long projectId) { | ||
super(HttpStatus.BAD_REQUEST, String.format("%s는 이미 신청한 프로젝트입니다.", projectId)); | ||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
...in/java/com/woongeya/zoing/domain/application/exception/ApplicationNotFoundException.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,13 +1,12 @@ | ||
package com.woongeya.zoing.domain.application.exception; | ||
|
||
import com.woongeya.zoing.global.error.exception.ErrorCode; | ||
import com.woongeya.zoing.global.error.JJoingException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
public class ApplicationNotFoundException extends JJoingException { | ||
import com.woongeya.zoing.global.exception.JJoingException; | ||
|
||
public static final JJoingException EXCEPTION = new ApplicationNotFoundException(); | ||
public class ApplicationNotFoundException extends JJoingException { | ||
|
||
public ApplicationNotFoundException () { | ||
super(ErrorCode.APPLICATION_NOT_FOUND); | ||
public ApplicationNotFoundException (Long id) { | ||
super(HttpStatus.NOT_FOUND, String.format("%s의 아이디를 가진 신청을 찾을 수 없습니다.", id)); | ||
} | ||
} |
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
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
9 changes: 5 additions & 4 deletions
9
src/main/java/com/woongeya/zoing/domain/chat/exception/ChatRoomNotFoundException.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,11 +1,12 @@ | ||
package com.woongeya.zoing.domain.chat.exception; | ||
|
||
import com.woongeya.zoing.global.error.exception.ErrorCode; | ||
import com.woongeya.zoing.global.error.JJoingException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
import com.woongeya.zoing.global.exception.JJoingException; | ||
|
||
public class ChatRoomNotFoundException extends JJoingException { | ||
|
||
public ChatRoomNotFoundException() { | ||
super(ErrorCode.CHAT_ROOM_NOT_FOUND); | ||
public ChatRoomNotFoundException(Long id) { | ||
super(HttpStatus.NOT_FOUND, String.format("%s의 아이디를 가진 채팅방을 찾을 수 없습니다.", id)); | ||
} | ||
} |
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
11 changes: 5 additions & 6 deletions
11
src/main/java/com/woongeya/zoing/domain/comment/exception/CommentNotFoundException.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,13 +1,12 @@ | ||
package com.woongeya.zoing.domain.comment.exception; | ||
|
||
import com.woongeya.zoing.global.error.exception.ErrorCode; | ||
import com.woongeya.zoing.global.error.JJoingException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
public class CommentNotFoundException extends JJoingException { | ||
import com.woongeya.zoing.global.exception.JJoingException; | ||
|
||
public static final JJoingException EXCEPTION = new CommentNotFoundException(); | ||
public class CommentNotFoundException extends JJoingException { | ||
|
||
public CommentNotFoundException() { | ||
super(ErrorCode.COMMENT_NOT_FOUND); | ||
public CommentNotFoundException(Long id) { | ||
super(HttpStatus.NOT_FOUND, String.format("%s의 아이디를 가진 댓글을 찾을 수 없습니다", id)); | ||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
src/main/java/com/woongeya/zoing/domain/comment/exception/ReCommentNotFoundException.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,14 +1,13 @@ | ||
package com.woongeya.zoing.domain.comment.exception; | ||
|
||
import com.woongeya.zoing.global.error.exception.ErrorCode; | ||
import com.woongeya.zoing.global.error.JJoingException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
public class ReCommentNotFoundException extends JJoingException { | ||
import com.woongeya.zoing.global.exception.JJoingException; | ||
|
||
public static final JJoingException EXCEPTION = new CommentNotFoundException(); | ||
public class ReCommentNotFoundException extends JJoingException { | ||
|
||
public ReCommentNotFoundException() { | ||
super(ErrorCode.RECOMMENT_NOT_FOUND); | ||
public ReCommentNotFoundException(Long id) { | ||
super(HttpStatus.NOT_FOUND, String.format("%s의 아이디를 가진 대댓글을 찾을 수 없습니다", id)); | ||
} | ||
} | ||
|
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
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
Oops, something went wrong.