good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
jrpc
Merge requests
!8
fix argreflect isErrorType
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix argreflect isErrorType
garet-argreflect
into
v2
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Garet Halliday
requested to merge
garet-argreflect
into
v2
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
see
https://go.dev/play/p/xj-hZLfbED9
0
0
Merge request reports
Compare
v2
v2 (base)
and
latest version
latest version
bccf4774
1 commit,
1 year ago
1 file
+
2
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
contrib/handlers/argreflect/reflect_handler.go
+
2
−
5
Options
@@ -66,13 +66,13 @@ func (e *callback) ServeRPC(w codec.ResponseWriter, r *codec.Request) {
fullargs
=
append
(
fullargs
,
reflect
.
ValueOf
(
r
.
Context
()))
}
fullargs
=
append
(
fullargs
,
args
...
)
//Catch panic while running the callback.
//
Catch panic while running the callback.
defer
func
()
{
if
err
:=
recover
();
err
!=
nil
{
const
size
=
64
<<
10
buf
:=
make
([]
byte
,
size
)
buf
=
buf
[
:
runtime
.
Stack
(
buf
,
false
)]
//fmt.Sprintf(`crashed: method=%s err=%v crashed=%s\n`, r.Method, err, string(buf))
//
fmt.Sprintf(`crashed: method=%s err=%v crashed=%s\n`, r.Method, err, string(buf))
// errRes := errors.New("method handler crashed: " + fmt.Sprint(err))
w
.
Send
(
nil
,
fmt
.
Errorf
(
"%s"
,
err
))
return
@@ -148,9 +148,6 @@ func (c *callback) makeArgTypes() {
// Does t satisfy the error interface?
func
isErrorType
(
t
reflect
.
Type
)
bool
{
for
t
.
Kind
()
==
reflect
.
Ptr
{
t
=
t
.
Elem
()
}
return
t
.
Implements
(
errorType
)
}
Loading