Skip to content

Commit ae37f82

Browse files
Format errors in (*Server).recover. (#2298)
1 parent ab6a2f4 commit ae37f82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/lsp/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ func (s *Server) getLanguageServiceAndCrossProjectOrchestrator(ctx context.Conte
699699
func (s *Server) recover(req *lsproto.RequestMessage) {
700700
if r := recover(); r != nil {
701701
stack := debug.Stack()
702-
s.logger.Error("panic handling request", req.Method, r, string(stack))
702+
s.logger.Errorf("panic handling request %s: %v\n%s", req.Method, r, string(stack))
703703
if req.ID != nil {
704704
s.sendError(req.ID, fmt.Errorf("%w: panic handling request %s: %v", lsproto.ErrorCodeInternalError, req.Method, r))
705705
} else {

0 commit comments

Comments
 (0)