Skip to content

Commit

Permalink
address glibsm comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yutongp committed Feb 14, 2017
1 parent e7cb200 commit d71bcf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/rpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"go.uber.org/yarpc/api/transport"
)

const panicResponse = "Server Error"
const _panicResponse = "Server Error"

type contextInboundMiddleware struct {
service.Host
Expand Down Expand Up @@ -111,6 +111,6 @@ func panicRecovery(ctx context.Context) {
fx.Logger(ctx).Error("Panic recovered serving request", "error", err)
// rethrow panic back to yarpc
// before https://github.com/yarpc/yarpc-go/issues/734 fixed, throw a generic error.
panic(panicResponse)
panic(_panicResponse)
}
}
2 changes: 1 addition & 1 deletion modules/rpc/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestOnewayInboundMiddleware_panic(t *testing.T) {

func testPanicHandler(t *testing.T) {
r := recover()
assert.EqualValues(t, r, panicResponse)
assert.EqualValues(t, r, _panicResponse)
}

type panicUnaryHandler struct{}
Expand Down

0 comments on commit d71bcf9

Please sign in to comment.