Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
6badbb32
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6badbb32
编写于
6月 21, 2013
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added the error handling screen
This page gets displayed when we throw an unhandled exception.
上级
d3575548
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
100 addition
and
2 deletion
+100
-2
core/pom.xml
core/pom.xml
+1
-1
core/src/main/java/hudson/WebAppMain.java
core/src/main/java/hudson/WebAppMain.java
+1
-1
core/src/main/java/hudson/init/impl/InstallUncaughtExceptionHandler.java
...ava/hudson/init/impl/InstallUncaughtExceptionHandler.java
+30
-0
core/src/main/java/hudson/util/PluginServletFilter.java
core/src/main/java/hudson/util/PluginServletFilter.java
+1
-0
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/Jenkins.java
+1
-0
core/src/main/resources/jenkins/model/Jenkins/oops.jelly
core/src/main/resources/jenkins/model/Jenkins/oops.jelly
+56
-0
core/src/main/resources/jenkins/model/Jenkins/oops.properties
.../src/main/resources/jenkins/model/Jenkins/oops.properties
+6
-0
war/src/main/webapp/WEB-INF/web.xml
war/src/main/webapp/WEB-INF/web.xml
+4
-0
war/src/main/webapp/images/rage.png
war/src/main/webapp/images/rage.png
+0
-0
未找到文件。
core/pom.xml
浏览文件 @
6badbb32
...
...
@@ -42,7 +42,7 @@ THE SOFTWARE.
<properties>
<staplerFork>
true
</staplerFork>
<stapler.version>
1.21
2
</stapler.version>
<stapler.version>
1.21
3
</stapler.version>
<spring.version>
2.5.6.SEC03
</spring.version>
</properties>
...
...
core/src/main/java/hudson/WebAppMain.java
浏览文件 @
6badbb32
...
...
@@ -206,7 +206,7 @@ public final class WebAppMain implements ServletContextListener {
context
.
setAttribute
(
APP
,
new
HudsonIsLoading
());
initThread
=
new
Thread
(
"
hudson
initialization thread"
)
{
initThread
=
new
Thread
(
"
Jenkins
initialization thread"
)
{
@Override
public
void
run
()
{
boolean
success
=
false
;
...
...
core/src/main/java/hudson/init/impl/InstallUncaughtExceptionHandler.java
0 → 100644
浏览文件 @
6badbb32
package
hudson.init.impl
;
import
hudson.init.Initializer
;
import
jenkins.model.Jenkins
;
import
org.kohsuke.stapler.WebApp
;
import
org.kohsuke.stapler.compression.CompressionFilter
;
import
org.kohsuke.stapler.compression.UncaughtExceptionHandler
;
import
javax.servlet.ServletContext
;
import
javax.servlet.ServletException
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
/**
* @author Kohsuke Kawaguchi
*/
public
class
InstallUncaughtExceptionHandler
{
@Initializer
public
static
void
init
(
final
Jenkins
j
)
throws
IOException
{
CompressionFilter
.
setUncaughtExceptionHandler
(
j
.
servletContext
,
new
UncaughtExceptionHandler
()
{
@Override
public
void
reportException
(
Throwable
e
,
ServletContext
context
,
HttpServletRequest
req
,
HttpServletResponse
rsp
)
throws
ServletException
,
IOException
{
req
.
setAttribute
(
"javax.servlet.error.exception"
,
e
);
WebApp
.
get
(
j
.
servletContext
).
getSomeStapler
()
.
invoke
(
req
,
rsp
,
Jenkins
.
getInstance
(),
"/oops"
);
}
});
}
}
core/src/main/java/hudson/util/PluginServletFilter.java
浏览文件 @
6badbb32
...
...
@@ -32,6 +32,7 @@ import javax.servlet.FilterConfig;
import
javax.servlet.ServletException
;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletResponse
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Vector
;
...
...
core/src/main/java/jenkins/model/Jenkins.java
浏览文件 @
6badbb32
...
...
@@ -3630,6 +3630,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro
||
rest
.
startsWith
(
"/logout"
)
||
rest
.
startsWith
(
"/accessDenied"
)
||
rest
.
startsWith
(
"/adjuncts/"
)
||
rest
.
startsWith
(
"/oops"
)
||
rest
.
startsWith
(
"/signup"
)
||
rest
.
startsWith
(
"/tcpSlaveAgentListener"
)
// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
...
...
core/src/main/resources/jenkins/model/Jenkins/oops.jelly
0 → 100644
浏览文件 @
6badbb32
<!--
The MIT License
Copyright (c) 2013- CloudBees, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<!--
This is the page designated by web.xml and UncaughtExceptionHandler to process an exception thrown by us.
-->
<st:statusCode value="500" />
<l:layout title="Jenkins" norefresh="true">
<l:header />
<l:side-panel>
<l:task title="${%Jenkins project}" href="http://jenkins-ci.org/" icon="images/24x24/next.png" />
<l:task title="${%Bug tracker}" href="http://issues.jenkins-ci.org/" icon="images/24x24/gear2.png" />
<l:task title="${%Mailing Lists}" href="http://jenkins-ci.org/content/mailing-lists" icon="images/24x24/search.png"/>
<l:task title="${%Twitter: @jenkinsci}" href="https://twitter.com/jenkinsci" icon="images/24x24/user.png"/>
</l:side-panel>
<l:main-panel>
<h1 style="text-align: center">
<img src="${imagesURL}/rage.png" height="179" width="154"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span>
</h1>
<p>
${%problemHappened}
${%checkJIRA}
${%vote}
${%pleaseReport}
${%stackTracePlease}
${%checkML}
</p>
<h2>${%Stack trace}</h2>
<pre style="margin:2em; clear:both">${h.printThrowable(request.getAttribute('javax.servlet.error.exception'))}</pre>
</l:main-panel>
</l:layout>
</j:jelly>
\ No newline at end of file
core/src/main/resources/jenkins/model/Jenkins/oops.properties
0 → 100644
浏览文件 @
6badbb32
problemHappened
=
A problem occurred while processing the request.
checkJIRA
=
Please check <a href="https://issues.jenkins-ci.org/">our bug tracker</a> to see if a similar problem has already been reported.
vote
=
If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem.
pleaseReport
=
If you think this is a new issue, please file a new issue.
stackTracePlease
=
When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins.
checkML
=
<a href="http://jenkins-ci.org/content/mailing-lists">The users list</a> might be also useful in understanding what has happened.
war/src/main/webapp/WEB-INF/web.xml
浏览文件 @
6badbb32
...
...
@@ -207,4 +207,8 @@ THE SOFTWARE.
<mime-type>
video/webm
</mime-type>
</mime-mapping>
<error-page>
<exception-type>
java.lang.Throwable
</exception-type>
<location>
/oops
</location>
</error-page>
</web-app>
war/src/main/webapp/images/rage.png
0 → 100644
浏览文件 @
6badbb32
此差异由.gitattributes 抑制。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录