Skip to content

Commit

Permalink
#33 [Fix] Exception 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
JSoi committed Jul 30, 2022
1 parent f760fbd commit f0c48ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.mpnp.baechelin.common;

import com.mpnp.baechelin.exception.CustomException;
import com.mpnp.baechelin.exception.ErrorCode;
import com.mpnp.baechelin.store.domain.Category;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.dsl.BooleanExpression;
Expand Down Expand Up @@ -38,7 +40,7 @@ private static StringPath givePath(String dbFacility) {
return store.approach;
if (dbFacility.equals("toilet"))
return store.toilet;
throw new IllegalArgumentException("배리어 프리 태그를 확인해주세요");
throw new CustomException(ErrorCode.INVALID_BARRIER_TAG);
}

public static BooleanBuilder locAndConditions(BigDecimal latStart, BigDecimal latEnd, BigDecimal lngStart, BigDecimal lngEnd, String category, List<String> facility) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/mpnp/baechelin/exception/ErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public enum ErrorCode {
API_LOAD_FAILURE(500, "E-ALF500", "API 로딩에 실패하였습니다."),
API_NO_RESULT(500, "E-ANR500", "API 결과가 존재하지 않습니다."),
NULL_POINTER_EXCEPTION(500, "E-NPE500", "빈 값이 들어올 수 없습니다."),
IMAGE_PROCESS_FAIL(500,"E-IPF500","이미지 오류 발생");
IMAGE_PROCESS_FAIL(500,"E-IPF500","이미지 오류 발생"),
INVALID_BARRIER_TAG(500, "E-IBT500","배리어 프리 태그를 확인해주세요");

private final int status;
private final String code;
Expand Down

0 comments on commit f0c48ea

Please sign in to comment.