diff --git a/vscode-extensions/vscode-manifest-yaml/src/main/java/org/springframework/ide/vscode/manifest/yaml/AbstractCFHintsProvider.java b/vscode-extensions/vscode-manifest-yaml/src/main/java/org/springframework/ide/vscode/manifest/yaml/AbstractCFHintsProvider.java index 7a9ee84cf..58450ea76 100644 --- a/vscode-extensions/vscode-manifest-yaml/src/main/java/org/springframework/ide/vscode/manifest/yaml/AbstractCFHintsProvider.java +++ b/vscode-extensions/vscode-manifest-yaml/src/main/java/org/springframework/ide/vscode/manifest/yaml/AbstractCFHintsProvider.java @@ -50,18 +50,21 @@ public abstract class AbstractCFHintsProvider implements Provider resolvedHints = getHints(targets); hints.addAll(resolvedHints); } catch (Throwable e) { - logger.log(Level.SEVERE, e.getMessage(), e); - // Don't propagate exception as to allow the CA to be displayed to - // the - // user. + // Don't log the no target found error. Just inform the user if (ExceptionUtil.getThrowable(e, NoTargetsException.class) != null) { hints.add(new BasicYValueHint(EMPTY_VALUE, e.getMessage())); - } else if (ExceptionUtil.getThrowable(e, IOException.class) != null) { - hints.add(new BasicYValueHint(EMPTY_VALUE, - "Connection failure to Cloud Foundry. Please check the log for more details.")); } else { - hints.add(new BasicYValueHint(EMPTY_VALUE, - "Failed to fetch values from Cloud Foundry. Please check the log for more details.")); + + // Log any other error + logger.log(Level.SEVERE, e.getMessage(), e); + + if (ExceptionUtil.getThrowable(e, IOException.class) != null) { + hints.add(new BasicYValueHint(EMPTY_VALUE, + "Connection failure to Cloud Foundry. Please check the log for more details.")); + } else { + hints.add(new BasicYValueHint(EMPTY_VALUE, + "Failed to fetch values from Cloud Foundry. Please check the log for more details.")); + } } } return hints;