ResponeThrowable.java 656 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.limao.im.base.net;
  2. public class ResponeThrowable extends Exception {
  3. private int status;
  4. private String msg;
  5. public ResponeThrowable(Throwable throwable, int code) {
  6. super(throwable);
  7. this.status = code;
  8. }
  9. public int getCode() {
  10. return status;
  11. }
  12. @Override
  13. public String getMessage() {
  14. return msg;
  15. }
  16. public void setMessage(String message) {
  17. this.msg = message;
  18. }
  19. @Override
  20. public String toString() {
  21. return "ResponeThrowable{" +
  22. "code=" + status +
  23. ", message='" + msg + '\'' +
  24. '}';
  25. }
  26. }