MyException.java 402 B

1234567891011121314151617
  1. package cn.seecoder.courselearning.exception;
  2. import cn.seecoder.courselearning.enums.ExceptionType;
  3. import lombok.AllArgsConstructor;
  4. import lombok.Getter;
  5. @Getter
  6. @AllArgsConstructor(staticName = "of")
  7. public class MyException extends RuntimeException {
  8. private final ExceptionType type;
  9. private final String msg;
  10. @Override
  11. public String getMessage() {
  12. return msg;
  13. }
  14. }