From d3d9fd32ec7ea6ff5a7c9ee7de72f91194bf6dfb Mon Sep 17 00:00:00 2001 From: Rain <938448486@qq.com> Date: Tue, 22 Nov 2022 05:55:58 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rain <938448486@qq.com> --- sa-token-doc/fun/exception-code.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sa-token-doc/fun/exception-code.md b/sa-token-doc/fun/exception-code.md index 887df9d2..2c083f40 100644 --- a/sa-token-doc/fun/exception-code.md +++ b/sa-token-doc/fun/exception-code.md @@ -13,7 +13,7 @@ Sa-Token 中的基础异常类是 `SaTokenException`,在此基础上,又针 ``` java if(SaFoxUtil.isUrl(url) == false) { - throw new SaSsoException("无效redirect:" + url).setCode(SaSsoExceptionCode.CODE_20001); + throw new SaSsoException("无效redirect:" + url).setCode(SaSsoErrorCode.CODE_30001); } ``` @@ -28,13 +28,13 @@ public class GlobalExceptionHandler { public SaResult handlerSaTokenException(SaTokenException e) { // 根据不同异常细分状态码返回不同的提示 - if(e.getCode() == 20001) { + if(e.getCode() == 30001) { return SaResult.error("redirect 重定向 url 是一个无效地址"); } - if(e.getCode() == 20002) { + if(e.getCode() == 30002) { return SaResult.error("redirect 重定向 url 不在 allowUrl 允许的范围内"); } - if(e.getCode() == 20004) { + if(e.getCode() == 30004) { return SaResult.error("提供的 ticket 是无效的"); } // 更多 code 码判断 ...