Skip to content

Commit

Permalink
refactor(CustomException): 생성자 추가 (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdkdhoho committed Nov 9, 2024
1 parent 905528f commit a86e4a6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit a86e4a6

Please sign in to comment.