33 lines
867 B
Java
33 lines
867 B
Java
package com.banesco.common.application.exception;
|
|
|
|
import com.banesco.common.domain.interfaces.BaseStatusCodesEnum;
|
|
|
|
public class BanRuntimeException extends RuntimeException {
|
|
|
|
protected BaseStatusCodesEnum statusCode;
|
|
protected String target;
|
|
|
|
public BanRuntimeException() {
|
|
super("Internal Error");
|
|
}
|
|
|
|
public BanRuntimeException(BaseStatusCodesEnum statusCode, String target) {
|
|
super(statusCode.getStatusDesc().formatted(target) + ", Target:" + target);
|
|
this.statusCode = statusCode;
|
|
this.target = target;
|
|
}
|
|
|
|
public BanRuntimeException(BaseStatusCodesEnum statusCode) {
|
|
super(statusCode.getStatusDesc());
|
|
this.statusCode = statusCode;
|
|
}
|
|
|
|
public BaseStatusCodesEnum getStatusCode() {
|
|
return statusCode;
|
|
}
|
|
|
|
public String getTarget() {
|
|
return target;
|
|
}
|
|
}
|