Quellcode durchsuchen

上传文件至 'src/main/java/com/weavi/ahh_v2/exception'

rookies vor 5 Jahren
Ursprung
Commit
27fe84b055
1 geänderte Dateien mit 23 neuen und 0 gelöschten Zeilen
  1. 23 0
      src/main/java/com/weavi/ahh_v2/exception/AhhException.java

+ 23 - 0
src/main/java/com/weavi/ahh_v2/exception/AhhException.java

@@ -0,0 +1,23 @@
+package com.weavi.ahh_v2.exception;
+
+import com.weavi.ahh_v2.enums.ResultEnum;
+
+/**
+ * @auther jiangzuole
+ * @date 2019-05-27
+ * @time 17:23
+ */
+public class AhhException extends RuntimeException {
+
+    private Integer code;
+
+    public AhhException(ResultEnum resultEnum){
+        super(resultEnum.getMessage());
+        this.code=resultEnum.getCode();
+    }
+
+    public AhhException(Integer code,String message){
+        super(message);
+        this.code=code;
+    }
+}