1 package com.supwisdom.institute.backend.common.framework.exception;
3 public class BaseException extends RuntimeException {
8 private static final long serialVersionUID = 2278568118369300446L;
18 protected int code = -1;
20 public BaseException(int code, String msgFormat, Object... args) {
21 super(String.format(msgFormat, args));
23 this.msg = String.format(msgFormat, args);
26 public BaseException() {
30 public BaseException(String message, Throwable cause) {
31 super(message, cause);
34 public BaseException(Throwable cause) {
38 public BaseException(String message) {
42 public String getMsg() {
46 public int getCode() {
58 public BaseException newInstance(String msgFormat, Object... args) {
59 return new BaseException(this.code, msgFormat, args);
62 public BaseException newInstance(int code, String msgFormat, Object... args) {
63 return new BaseException(code, msgFormat, args);