File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,12 +52,29 @@ async function checkJavaExtActivated(_context: vscode.ExtensionContext): Promise
5252
5353 // Trace the interested LSP requests performance
5454 javaExt . exports ?. onDidRequestEnd ( ( traceEvent : any ) => {
55+ let code : number = 0 ;
56+ let errorMessage : string = "" ;
57+ if ( traceEvent . error ) {
58+ code = traceEvent . error ?. code || 0 ;
59+ errorMessage = traceEvent . error ?. message || String ( traceEvent . error ) ;
60+ }
61+
5562 if ( INTERESTED_REQUESTS . has ( traceEvent . type ) ) {
56- sendInfo ( "" , {
57- name : "lsp" ,
58- kind : escapeLspRequestName ( traceEvent . type ) ,
59- duration : Math . trunc ( traceEvent . duration ) ,
60- } ) ;
63+ if ( errorMessage ) {
64+ sendInfo ( "" , {
65+ name : "lsp" ,
66+ kind : escapeLspRequestName ( traceEvent . type ) ,
67+ duration : Math . trunc ( traceEvent . duration ) ,
68+ code,
69+ message : errorMessage ,
70+ } ) ;
71+ } else {
72+ sendInfo ( "" , {
73+ name : "lsp" ,
74+ kind : escapeLspRequestName ( traceEvent . type ) ,
75+ duration : Math . trunc ( traceEvent . duration ) ,
76+ } ) ;
77+ }
6178 }
6279 } ) ;
6380
You can’t perform that action at this time.
0 commit comments