package incheon.com.cmm.exception;

import org.springframework.http.HttpStatus;

import lombok.Getter;

/**
 * @Class Name : BusinessException.java
 * @Description : 비즈니스 로직 관련 예외 클래스
 * @Modification Information
 *
 *    수정일       수정자         수정내용
 *    -------     -------     -------------------
 *
 */
@Getter
public class BusinessException extends RuntimeException {
    
    private final HttpStatus status;
    
    public BusinessException(String message) {
        this(message, HttpStatus.INTERNAL_SERVER_ERROR);
    }
    
    public BusinessException(String message, HttpStatus status) {
        super(message);
        this.status = status;
    }
    
    public BusinessException(String message, Throwable cause) {
        this(message, HttpStatus.INTERNAL_SERVER_ERROR, cause);
    }
    
    public BusinessException(String message, HttpStatus status, Throwable cause) {
        super(message, cause);
        this.status = status;
    }
} 