View Javadoc
1   package com.zone.weixin4j.exception;
2   
3   /**
4    * Created by Yz on 2017/3/15.
5    * 微信消息拦截器异常
6    */
7   public class MessageInterceptorException extends Exception {
8   
9       private static final long serialVersionUID = -1094109872039360113L;
10  
11      private String code;
12      private String msg;
13  
14      public MessageInterceptorException(String errorCode, String errorMsg) {
15          this.code = errorCode;
16          this.msg = errorMsg;
17      }
18  
19      public MessageInterceptorException(String errorMsg) {
20          this.code = "-1";
21          this.msg = errorMsg;
22      }
23  
24      public MessageInterceptorException(Exception e) {
25          super(e);
26      }
27  
28      public MessageInterceptorException(String errorMsg, Exception e) {
29          super(e);
30          this.msg = errorMsg;
31      }
32  
33      public String getErrorCode() {
34          return code;
35      }
36  
37      public String getErrorMsg() {
38          return msg;
39      }
40  
41      @Override
42      public String getMessage() {
43          return this.code + "," + this.msg;
44      }
45  
46  }