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;