package org.egl_cepgl.pm.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(HttpStatus.NOT_FOUND)
public class EntityNotFoundException extends RuntimeException{

    @Getter
    private ErrorCodes errorCode;

    public EntityNotFoundException(String msg){
        super(msg);
    }

    public EntityNotFoundException(String msg, Throwable cause){
        super(msg, cause);
    }

    public EntityNotFoundException(String msg, Throwable cause, ErrorCodes errorCode){
        super(msg, cause);
        this.errorCode= errorCode;
    }

    public EntityNotFoundException(String msg, ErrorCodes errorCode){
        super(msg);
        this.errorCode= errorCode;
    }
}
