Skip to content

Commit

Permalink
#346 [refactor] 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
sohyundoh committed Jun 11, 2024
1 parent 19c3459 commit d77a597
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public enum ErrorMessage {
IMAGE_DELETE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "S3 버킷으로부터 이미지를 삭제하는 데 실패했습니다."),
INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "서버 내부 오류입니다."),
DISCORD_LOG_APPENDER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "디스코드 로그 전송에 실패하였습니다"),
TIME_OUT_EXCEPTION(HttpStatus.INTERNAL_SERVER_ERROR.value(), "락을 획득하는 과정에서 Time Out이 발생했습니다."),
;

final int status;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.mile.moim.service.lock;

import com.mile.exception.message.ErrorMessage;
import com.mile.exception.model.MileException;
import lombok.RequiredArgsConstructor;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
Expand Down Expand Up @@ -38,7 +40,7 @@ public Object validateUniqueName(final ProceedingJoinPoint joinPoint) throws Thr
}

public void checkAvailability(final Boolean available) {
if (!available) throw new RuntimeException("Lock is Unavailable");
if (!available) throw new MileException(ErrorMessage.TIME_OUT_EXCEPTION);
}

}

0 comments on commit d77a597

Please sign in to comment.