Prechádzať zdrojové kódy

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

rookies 5 rokov pred
rodič
commit
27fe84b055

+ 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;
+    }
+}