500页面,json情况下,支持返回错误信息。
This commit is contained in:
@@ -23,7 +23,12 @@ if (isBlank(message)){
|
|||||||
|
|
||||||
// 如果是异步请求或是手机端,则直接返回信息
|
// 如果是异步请求或是手机端,则直接返回信息
|
||||||
if (@ServletUtils.isAjaxRequest(request)) {
|
if (@ServletUtils.isAjaxRequest(request)) {
|
||||||
|
if (@Global.getConfigToBoolean('error.page.printErrorInfo', 'true')
|
||||||
|
&& !@StringUtils.equals(message, "演示模式,不允许操作!") && ex != null){
|
||||||
|
print(@ServletUtils.renderResult(@Global.FALSE, message, @ExceptionUtils.getStackTraceAsString(ex)));
|
||||||
|
}else{
|
||||||
print(@ServletUtils.renderResult(@Global.FALSE, message));
|
print(@ServletUtils.renderResult(@Global.FALSE, message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 输出异常信息页面
|
// 输出异常信息页面
|
||||||
|
|||||||
Reference in New Issue
Block a user