Blame view

src/main/java/com/objecteye/exception/CustomXException.java 748 Bytes
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  package com.objecteye.exception;
  
  import java.util.Map;
  
  /**
   * custom exception which handles custom request error.
   */
  public class CustomXException extends RuntimeException {
      private String msg;
      private String code;
      private Map<String, Object> params = null;
  
      public CustomXException(String msg, String code, Map<String, Object> params) {
          this.code = code;
          this.msg = msg;
          this.params = params;
      }
  
      public CustomXException(String msg, String code) {
          this.code = code;
          this.msg = msg;
      }
  
  
      public String getCode() {
          return code;
      }
  
      public String getMsg() {
          return msg;
      }
  
      public Map<String, Object> getParams() {
          return params;
      }
  }