File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
139
139
const isDebugModeByClientPort = ! ! process . env [ 'SYNTAXLS_CLIENT_PORT' ] || ! ! process . env [ 'JDTLS_CLIENT_PORT' ] ;
140
140
const requireSyntaxServer = ( serverMode !== ServerMode . standard ) && ( ! isDebugModeByClientPort || ! ! process . env [ 'SYNTAXLS_CLIENT_PORT' ] ) ;
141
141
let requireStandardServer = ( serverMode !== ServerMode . lightWeight ) && ( ! isDebugModeByClientPort || ! ! process . env [ 'JDTLS_CLIENT_PORT' ] ) ;
142
+ let initFailureReported : boolean = false ;
142
143
143
144
// Options to control the language client
144
145
const clientOptions : LanguageClientOptions = {
@@ -244,6 +245,15 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
244
245
initializationFailedHandler : error => {
245
246
logger . error ( `Failed to initialize ${ extensionName } due to ${ error && error . toString ( ) } ` ) ;
246
247
if ( error . toString ( ) . includes ( 'Connection' ) && error . toString ( ) . includes ( 'disposed' ) ) {
248
+ if ( ! initFailureReported ) {
249
+ apiManager . fireTraceEvent ( {
250
+ name : "java.client.error.initialization" ,
251
+ properties : {
252
+ message : error && error . toString ( ) ,
253
+ } ,
254
+ } ) ;
255
+ }
256
+ initFailureReported = true ;
247
257
return false ;
248
258
} else {
249
259
return true ;
Original file line number Diff line number Diff line change @@ -159,6 +159,12 @@ export class StandardLanguageClient {
159
159
this . status = ClientStatus . error ;
160
160
serverStatus . updateServerStatus ( ServerStatusKind . error ) ;
161
161
apiManager . updateStatus ( ClientStatus . error ) ;
162
+ apiManager . fireTraceEvent ( {
163
+ name : "java.ls.error.serviceError" ,
164
+ properties : {
165
+ message : report . message ,
166
+ } ,
167
+ } ) ;
162
168
break ;
163
169
case 'ProjectStatus' :
164
170
if ( report . message === "WARNING" ) {
@@ -250,6 +256,12 @@ export class StandardLanguageClient {
250
256
break ;
251
257
case MessageType . Error :
252
258
show = window . showErrorMessage ;
259
+ apiManager . fireTraceEvent ( {
260
+ name : "java.ls.error.notification" ,
261
+ properties : {
262
+ message : notification . message ,
263
+ } ,
264
+ } ) ;
253
265
break ;
254
266
}
255
267
if ( ! show ) {
You can’t perform that action at this time.
0 commit comments