Browse Source

修改异常命名

zhouhao 7 năm trước cách đây
mục cha
commit
d7f84f399b

+ 22 - 0
hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/exception/AccessDenyException.java

@@ -0,0 +1,22 @@
+package org.hswebframework.web.authorization.exception;
+
+/**
+ * 权限验证异常
+ *
+ * @author zhouhao
+ * @since 3.0
+ */
+public class AccessDenyException extends RuntimeException {
+
+    public AccessDenyException() {
+        this("{access_deny}");
+    }
+
+    public AccessDenyException(String message) {
+        super(message);
+    }
+
+    public AccessDenyException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

+ 0 - 19
hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/exception/AuthorizationException.java

@@ -1,19 +0,0 @@
-package org.hswebframework.web.authorization.exception;
-
-/**
- * 权限验证异常
- * @author zhouhao
- */
-public class AuthorizationException extends RuntimeException {
-
-    public AuthorizationException() {
-    }
-
-    public AuthorizationException(String message) {
-        super(message);
-    }
-
-    public AuthorizationException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}

+ 9 - 0
hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/exception/UnAuthorizedException.java

@@ -18,6 +18,12 @@
 
 package org.hswebframework.web.authorization.exception;
 
+/**
+ * 未授权异常
+ *
+ * @author zhouhao
+ * @since 3.0
+ */
 public class UnAuthorizedException extends RuntimeException {
     private static final long serialVersionUID = 2422918455013900645L;
 
@@ -29,4 +35,7 @@ public class UnAuthorizedException extends RuntimeException {
         super(message);
     }
 
+    public UnAuthorizedException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }