From a86e4a60f5c3b948dd73d8223c90f40387444218 Mon Sep 17 00:00:00 2001 From: kdkdhoho Date: Thu, 31 Oct 2024 14:02:37 +0900 Subject: [PATCH] =?UTF-8?q?=20refactor(CustomException):=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9E=90=20=EC=B6=94=EA=B0=80=20(#316)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/listywave/common/exception/CustomException.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/listywave/common/exception/CustomException.java b/src/main/java/com/listywave/common/exception/CustomException.java index 3d72a463..2c9c6004 100644 --- a/src/main/java/com/listywave/common/exception/CustomException.java +++ b/src/main/java/com/listywave/common/exception/CustomException.java @@ -1,14 +1,17 @@ package com.listywave.common.exception; -import lombok.AllArgsConstructor; import lombok.Getter; @Getter -@AllArgsConstructor public class CustomException extends RuntimeException { private final ErrorCode errorCode; + public CustomException(ErrorCode errorCode) { + super(errorCode.getDetail()); + this.errorCode = errorCode; + } + public CustomException(ErrorCode errorCode, String message) { super(message); this.errorCode = errorCode;