From f2c8f7eef9a2aec5e0fd8c3c639328bd6deee911 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Fri, 15 Jun 2018 22:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96500=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/core/src/main/resources/views/error/500.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/resources/views/error/500.html b/modules/core/src/main/resources/views/error/500.html index e610772c..8700cd24 100644 --- a/modules/core/src/main/resources/views/error/500.html +++ b/modules/core/src/main/resources/views/error/500.html @@ -7,10 +7,14 @@ var ex; if (isBlank(message)){ ex = @ExceptionUtils.getThrowable(request); if (ex != null){ - if (@StringUtils.startsWith(@ex.getMessage(), "msg:")){ - message = @StringUtils.replace(@ex.getMessage(), "msg:", ""); + if (@StringUtils.startsWith(ex.message, "msg:")){ + message = @StringUtils.replace(ex.message, "msg:", ""); + }else if (@StringUtils.startsWith(ex.cause.message, "msg:")){ + message = @StringUtils.replace(ex.cause.message, "msg:", ""); }else if (ex.class.name == 'com.jeesite.common.service.ServiceException'){ - message = @ex.getMessage(); + message = ex.message; + }else if (ex.cause.class.name == 'com.jeesite.common.service.ServiceException'){ + message = ex.cause.message; } @org.slf4j.LoggerFactory.getLogger("error/500").error(ex.message, ex); }