SystemException.java 611 B

1234567891011121314151617181920212223242526272829
  1. package com.ydtech.exception;
  2. public class SystemException extends RuntimeException {
  3. private static final long serialVersionUID = -8279298258775808815L;
  4. private final String code;
  5. public SystemException(String message) {
  6. super(message);
  7. this.code = "500";
  8. }
  9. public SystemException(String code, String message) {
  10. super(message);
  11. this.code = code;
  12. }
  13. public SystemException(String code, String message, Throwable cause) {
  14. super(message, cause);
  15. this.code = code;
  16. }
  17. public String getCode() {
  18. return code;
  19. }
  20. }