Blame view

ruoyi-common/src/main/java/com/ruoyi/common/exception/CustomException.java 784 Bytes
46444bd0   RuoYi   RuoYi-Vue 1.0
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
37
38
39
40
41
42
43
  package com.ruoyi.common.exception;

  

  /**

   * 自定义异常

   * 

   * @author ruoyi

   */

  public class CustomException extends RuntimeException

  {

      private static final long serialVersionUID = 1L;

  

      private Integer code;

  

      private String message;

  

      public CustomException(String message)

      {

          this.message = message;

      }

  

      public CustomException(String message, Integer code)

      {

          this.message = message;

          this.code = code;

      }

  

      public CustomException(String message, Throwable e)

      {

          super(message, e);

          this.message = message;

      }

  

      @Override

      public String getMessage()

      {

          return message;

      }

  

      public Integer getCode()

      {

          return code;

      }

  }