Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.example.solidconnection.cache.annotation.ThunderingHerdCaching;
import com.example.solidconnection.cache.manager.CacheManager;
import com.example.solidconnection.common.exception.CustomException;
import com.example.solidconnection.util.RedisUtils;
import java.time.Duration;
import java.util.UUID;
Expand Down Expand Up @@ -114,6 +115,8 @@ private Object executeWithLock(String lockKey, Callable<Object> onLockAcquired,
} else {
return onLockFailed.call();
}
} catch (CustomException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Error during executeWithLock", e);
} finally {
Expand Down Expand Up @@ -150,6 +153,8 @@ private Object waitForCacheToUpdate(ProceedingJoinPoint joinPoint, String key) {
private Object proceedJoinPoint(ProceedingJoinPoint joinPoint) {
try {
return joinPoint.proceed();
} catch (CustomException e) {
throw e;
} catch (Throwable e) {
throw new RuntimeException("Error during proceedJoinPoint", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ class 대학_지원_정보_상세_조회 {
Long invalidUnivApplyInfoId = 9999L;

// when & then
assertThatExceptionOfType(RuntimeException.class)
assertThatExceptionOfType(CustomException.class)
.isThrownBy(() -> univApplyInfoQueryService.getUnivApplyInfoDetail(invalidUnivApplyInfoId))
.havingRootCause()
.isInstanceOf(CustomException.class)
.withMessage(UNIV_APPLY_INFO_NOT_FOUND.getMessage());
}
}
Expand Down
Loading