BaseException.java 899 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.yaozhitech.spring5.common.exception;
  2. /**
  3. * Created by ace on 2017/9/8.
  4. */
  5. public class BaseException extends RuntimeException {
  6. private int status = 200;
  7. public int getStatus() {
  8. return status;
  9. }
  10. public void setStatus(int status) {
  11. this.status = status;
  12. }
  13. public BaseException() {
  14. }
  15. public BaseException(String message,int status) {
  16. super(message);
  17. this.status = status;
  18. }
  19. public BaseException(String message) {
  20. super(message);
  21. }
  22. public BaseException(String message, Throwable cause) {
  23. super(message, cause);
  24. }
  25. public BaseException(Throwable cause) {
  26. super(cause);
  27. }
  28. public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
  29. super(message, cause, enableSuppression, writableStackTrace);
  30. }
  31. }