修复包名取不到jakarta异常类问题

This commit is contained in:
thinkgem
2023-11-06 15:38:47 +08:00
parent 128690bd2a
commit fcb42bfda9

View File

@@ -5,11 +5,11 @@
*/
package com.jeesite.common.lang;
import jakarta.servlet.http.HttpServletRequest;
import java.io.PrintWriter;
import java.io.StringWriter;
import jakarta.servlet.http.HttpServletRequest;
/**
* 关于异常的工具类.
* @author calvin
@@ -26,8 +26,8 @@ public class ExceptionUtils {
Throwable ex = null;
if (request.getAttribute("exception") != null) {
ex = (Throwable) request.getAttribute("exception");
} else if (request.getAttribute("javax.servlet.error.exception") != null) {
ex = (Throwable) request.getAttribute("javax.servlet.error.exception");
} else if (request.getAttribute("jakarta.servlet.error.exception") != null) {
ex = (Throwable) request.getAttribute("jakarta.servlet.error.exception");
}
return ex;
}