File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -485,17 +485,18 @@ export class LaunchConfig implements LaunchRequestArguments {
485485 throw new Error ( ) ;
486486 } else {
487487 logger . debug ( `syntaxCheck-promise: ${ fileUri . fsPath } ` ) ;
488- return clientTools . syntaxCheck ( fileUri . fsPath , [ "-syntax" , ...this . eclccSyntaxArgs ] ) . then ( ( errors ) => {
488+ const args = [ ...this . eclccSyntaxArgs ] ;
489+ return clientTools . syntaxCheck ( fileUri . fsPath , args ) . then ( ( errors ) => {
489490 if ( errors . hasUnknown ( ) ) {
490491 logger . warning ( `syntaxCheck-warning: ${ fileUri . fsPath } ${ errors . unknown ( ) . toString ( ) } ` ) ;
491492 }
492493 logger . debug ( `syntaxCheck-resolve: ${ fileUri . fsPath } ${ errors . errors ( ) . length } total.` ) ;
493494 reporter . sendTelemetryEvent ( "launchConfig.checkSyntax.success" , { } , { "errorCount" : errors . all ( ) . length } ) ;
494495 return { errors : errors . all ( ) , checked : errors . checked ( ) } ;
495496 } ) . catch ( e => {
496- logger . debug ( `syntaxCheck-reject : ${ fileUri . fsPath } ${ e . msg } ` ) ;
497- reporter . sendTelemetryErrorEvent ( "launchConfig.checkSyntax.fail" , { "message" : e ?. msg } ) ;
498- vscode . window . showInformationMessage ( `${ localize ( "Syntax check exception" ) } : ${ fileUri . fsPath } ${ e . msg } ` ) ;
497+ logger . debug ( `checkSyntax-exception : ${ fileUri . fsPath } ${ e . message } ` ) ;
498+ reporter . sendTelemetryErrorEvent ( "launchConfig.checkSyntax.fail" , { "message" : e ?. message } ) ;
499+ vscode . window . showErrorMessage ( `${ localize ( "Syntax check exception" ) } : ${ e . message } (eclcc -syntax ${ args . join ( " " ) } ${ fileUri . fsPath } ) ` ) ;
499500 return Promise . resolve ( { errors : [ ] , checked : [ ] } ) ;
500501 } ) ;
501502 }
You can’t perform that action at this time.
0 commit comments