BaseRuntimeException.java 713 B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.fdkankan.common.exception;
  2. public class BaseRuntimeException extends RuntimeException{
  3. private static final long serialVersionUID = -1518945670203783450L;
  4. private Integer code;
  5. private String msg;
  6. public BaseRuntimeException(String msg){
  7. super(msg);
  8. this.msg = msg;
  9. }
  10. public BaseRuntimeException(Integer code, String msg){
  11. super(msg);
  12. this.code = code;
  13. this.msg = msg;
  14. }
  15. public Integer getCode() {
  16. return code;
  17. }
  18. public void setCode(Integer code) {
  19. this.code = code;
  20. }
  21. public String getMsg() {
  22. return msg;
  23. }
  24. public void setMsg(String msg) {
  25. this.msg = msg;
  26. }
  27. }