SystemException.java 566 B

123456789101112131415161718192021222324252627282930313233
  1. package com.edu.service.exception;
  2. public class SystemException extends RuntimeException {
  3. private static final long serialVersionUID = 1L;
  4. // 错误code
  5. public String errorCode;
  6. public SystemException() {
  7. }
  8. public SystemException(String message) {
  9. super(message);
  10. }
  11. public SystemException(String errorCode, String message) {
  12. super(message);
  13. this.errorCode = errorCode;
  14. }
  15. public SystemException(String errorCode, Throwable cause) {
  16. super(cause);
  17. this.errorCode = errorCode;
  18. }
  19. public String getErrorCode() {
  20. return errorCode;
  21. }
  22. }