1、错误异常界面国际化;2、服务请求异常国际化;3、文件样例界面样式修改。

This commit is contained in:
zhangwei
2018-05-21 14:10:11 +08:00
parent da85e1800d
commit cd9b60d0e0
10 changed files with 94 additions and 54 deletions

View File

@@ -8,11 +8,11 @@ if (ex != null){
}
// 编译错误信息
StringBuilder sb = new StringBuilder("错误信息\n");
StringBuilder sb = new StringBuilder("<spring:message code=\"exception_info\"/>\n");
if (ex != null) {
sb.append(Exceptions.getStackTraceAsString(ex));
} else {
sb.append("未知错误.\n\n");
sb.append("<spring:message code=\"unkown_error\"/>.\n\n");
}
// 如果是异步请求或是手机端,则直接返回信息
@@ -32,22 +32,23 @@ else {
<!DOCTYPE html>
<html>
<head>
<title>500 - 系统内部错误</title>
<title>500 - <spring:message code="system_error"/></title>
<%@include file="/WEB-INF/include/header.jsp" %>
</head>
<body>
<div class="container-fluid">
<div class="page-header"><h1>500-系统内部错误.</h1></div>
<div class="page-header"><h1>500-<spring:message code="system_error"/>.</h1></div>
<div class="errorMessage">
错误信息:<%=ex==null?"未知错误.":StringUtils.toHtml(ex.getMessage())%> <br/> <br/>
请点击“查看详细信息”按钮,将详细错误信息发送给系统管理员,谢谢!<br/> <br/>
<a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a> &nbsp;
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn">查看详细信息</a>
<spring:message code="exception_info"/><%=ex==null?"<spring:message code=\"unkown_error\"/>.":StringUtils.toHtml(ex.getMessage())%> <br/> <br/>
<!-- 请点击“查看详细信息”按钮,将详细错误信息发送给系统管理员,谢谢! -->
<spring:message code="click_detail"/><br/> <br/>
<a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a> &nbsp;
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn"><spring:message code="show_detail"/></a>
</div>
<div class="errorMessage hide">
<%=StringUtils.toHtml(sb.toString())%> <br/>
<a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a> &nbsp;
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn">隐藏详细信息</a>
<a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a> &nbsp;
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn"><spring:message code="hidden_detail"/></a>
<br/> <br/>
</div>
<script>try{top.$.jBox.closeTip();}catch(e){}</script>