Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
34a64a27
Commit
34a64a27
authored
Oct 17, 2014
by
Daniel Smith
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1857 from deads2k/dev/deads/fixup-error-reporting
report originating error for GetReference failure
parents
ea3d3c06
2c35c067
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
handlers.go
pkg/apiserver/handlers.go
+1
-1
event.go
pkg/client/record/event.go
+1
-1
No files found.
pkg/apiserver/handlers.go
View file @
34a64a27
...
@@ -34,7 +34,7 @@ func RecoverPanics(handler http.Handler) http.Handler {
...
@@ -34,7 +34,7 @@ func RecoverPanics(handler http.Handler) http.Handler {
if
x
:=
recover
();
x
!=
nil
{
if
x
:=
recover
();
x
!=
nil
{
w
.
WriteHeader
(
http
.
StatusInternalServerError
)
w
.
WriteHeader
(
http
.
StatusInternalServerError
)
fmt
.
Fprint
(
w
,
"apis panic. Look in log for details."
)
fmt
.
Fprint
(
w
,
"apis panic. Look in log for details."
)
glog
.
Infof
(
"APIServer panic'd on %v %v: %
#
v
\n
%s
\n
"
,
req
.
Method
,
req
.
RequestURI
,
x
,
debug
.
Stack
())
glog
.
Infof
(
"APIServer panic'd on %v %v: %v
\n
%s
\n
"
,
req
.
Method
,
req
.
RequestURI
,
x
,
debug
.
Stack
())
}
}
}()
}()
defer
httplog
.
NewLogged
(
req
,
&
w
)
.
StacktraceWhen
(
defer
httplog
.
NewLogged
(
req
,
&
w
)
.
StacktraceWhen
(
...
...
pkg/client/record/event.go
View file @
34a64a27
...
@@ -99,7 +99,7 @@ var events = watch.NewMux(queueLen)
...
@@ -99,7 +99,7 @@ var events = watch.NewMux(queueLen)
func
Event
(
object
runtime
.
Object
,
fieldPath
,
status
,
reason
,
message
string
)
{
func
Event
(
object
runtime
.
Object
,
fieldPath
,
status
,
reason
,
message
string
)
{
ref
,
err
:=
api
.
GetReference
(
object
)
ref
,
err
:=
api
.
GetReference
(
object
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Could not construct reference to: %#v
"
,
object
)
glog
.
Errorf
(
"Could not construct reference to: %#v
due to: %v"
,
object
,
err
)
return
return
}
}
ref
.
FieldPath
=
fieldPath
ref
.
FieldPath
=
fieldPath
...
...
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