@@ -115,19 +115,23 @@ public void onBindingChanged(BindingConfigChangedEvent event) {
115115 }
116116
117117 private void handleGeneration (String configScopeId , Path baseDir , Binding binding ) {
118- var paramsOpt = prepareCliParams (binding , configScopeId );
119- if (paramsOpt .isPresent ()) {
120- var workingDir = computeWorkingBaseDir (baseDir );
121- if (initializedScopes .add (configScopeId )) {
122- runInit (workingDir );
123- }
124- runGenerateGuidelines (workingDir , paramsOpt .get ());
125- runMergeMd (workingDir );
126- if (mdcInstalledScopes .add (configScopeId )) {
127- runInstall (workingDir );
118+ try {
119+ var paramsOpt = prepareCliParams (binding , configScopeId );
120+ if (paramsOpt .isPresent ()) {
121+ var workingDir = computeWorkingBaseDir (baseDir );
122+ if (initializedScopes .add (configScopeId )) {
123+ runInit (workingDir );
124+ }
125+ runGenerateGuidelines (workingDir , paramsOpt .get ());
126+ runMergeMd (workingDir );
127+ if (mdcInstalledScopes .add (configScopeId )) {
128+ runInstall (workingDir );
129+ }
130+ } else {
131+ LOG .debug ("Missing parameters for SonarCodeContext CLI, skipping for configuration scope '{}'" , configScopeId );
128132 }
129- } else {
130- LOG .debug ("Missing parameters for SonarCodeContext CLI, skipping for configuration scope '{}' " , configScopeId );
133+ } catch ( Exception e ) {
134+ LOG .debug ("[DOGFOOD] Failed to run code context CLI " , e . getMessage () );
131135 }
132136 }
133137
0 commit comments