Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
51496b4e
Commit
51496b4e
authored
Jun 21, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log exception in ErrorPageFilter
Fixes gh-1130
parent
772df9be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ErrorPageFilter.java
...org/springframework/boot/context/web/ErrorPageFilter.java
+5
-5
No files found.
spring-boot/src/main/java/org/springframework/boot/context/web/ErrorPageFilter.java
View file @
51496b4e
...
...
@@ -136,18 +136,18 @@ class ErrorPageFilter extends AbstractConfigurableEmbeddedServletContainer imple
request
.
setAttribute
(
ERROR_EXCEPTION
,
ex
);
request
.
setAttribute
(
ERROR_EXCEPTION_TYPE
,
type
.
getName
());
wrapped
.
sendError
(
500
,
ex
.
getMessage
());
forwardToErrorPage
(
errorPath
,
request
,
wrapped
);
forwardToErrorPage
(
errorPath
,
request
,
wrapped
,
ex
);
}
private
void
forwardToErrorPage
(
String
path
,
HttpServletRequest
request
,
ServletResponse
response
)
throws
ServletException
,
IOException
{
ServletResponse
response
,
Throwable
ex
)
throws
ServletException
,
IOException
{
if
(!
response
.
isCommitted
())
{
String
message
=
"Cannot forward to error page for"
+
request
.
getRequestURI
()
+
" (response is committed), so this response may have "
+
"the wrong status code"
;
// User might see the error page without all the data here but th
e exception
//
isn't going to help anyone (and it's already been logged
)
logger
.
error
(
message
);
// User might see the error page without all the data here but th
rowing the
//
exception isn't going to help anyone (we'll log it to be on the safe side
)
logger
.
error
(
message
,
ex
);
return
;
}
response
.
reset
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment