fwq
2022-05-09 8fcea52f023500d5ada8afc533989592493e79ce
提交 | 用户 | age
5c5945 1 package com.hx.exception;
E 2
3 /** 判断异常/业务异常
4  * @author ChenJiaHe
5  * @Date 2020-06-19
6  */
7 public class ServiceException extends RuntimeException {
8
9     private Integer code;
10
11     public ServiceException(String message) {
12         super(message);
13     }
14
15     public ServiceException(String message, Integer code) {
16         super(message);
17         this.code = code;
18     }
19
20     public ServiceException(String message, Throwable cause, Integer code) {
21         super(message, cause);
22         this.code = code;
23     }
24
25     public ServiceException(Throwable cause, Integer code) {
26         super(cause);
27         this.code = code;
28     }
29
30     //@Override
31     public int getCode() {
32         return this.code;
33     }
34 }